nope.. u don't give me wrong code
- Original Message -
From: Niel Archer [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Saturday, February 17, 2007 2:43 AM
Subject: Re: [PHP-DB] csv problem.. read csv from var
Hi
sorry, I misunderstood your problem, it was not too clear to me
- Original Message -
From: Niel Archer [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Friday, February 16, 2007 1:59 PM
Subject: Re: [PHP-DB] csv problem.. read csv from var
hi
the problem i have is.. how about the csv is a var
DATA===
$csv
Hi
sorry, I misunderstood your problem, it was not too clear to me as the
code you list shouldn't produce the output you supplied.
try this:
$array = explode(',', $csv);
print br= . $array[0] . \n;
print br= . $array[1] . \n;
for ($i = 2; $i count($array); ++$i) {
$txt.= br /= .
2007/2/16, bedul [EMAIL PROTECTED]:
i have problem with reading csv.. for i know the example script i get was
BASIC SCRIPT=
$handle = fopen(hasillab.csv, r);
$data2=$handle;
while($data = fgetcsv($handle, 1000, ,)){
foreach($data as $str)
$data2.=br=
i have problem with reading csv.. for i know the example script i get was
BASIC SCRIPT=
$handle = fopen(hasillab.csv, r);
$data2=$handle;
while($data = fgetcsv($handle, 1000, ,)){
foreach($data as $str)
$data2.=br= .$str;
}
the result was:
hi
the problem i have is.. how about the csv is a var
DATA===
$csv=
A507257,3/2/2007,\Hematologi Lengkap,Cholesterol Total,LDL
Cholesterol,Trigliserida,HDL Cholesterol,Asam Urat,Gula Darah Puasa,Gula
Darah 2 Jam PP,Kreatinin,Ureum,Bilirubin Total,Alkali