ItsMe
06-23-2005, 06:04 PM
I have this code:
<?php
$handle = fopen("info.csv", "r");
$data = fgetcsv($handle, 1000, ";");
$data2 = explode(",", $data);
echo $data2[0]; // piece1
echo $data2[1]; // piece2
?> It gets a csv file and then what i want it to do is explode it into several variables.
I cannot get it to work. When i preview it all i get is "Array" on the page.
Am i doing something wrong? :confused:
<?php
$handle = fopen("info.csv", "r");
$data = fgetcsv($handle, 1000, ";");
$data2 = explode(",", $data);
echo $data2[0]; // piece1
echo $data2[1]; // piece2
?> It gets a csv file and then what i want it to do is explode it into several variables.
I cannot get it to work. When i preview it all i get is "Array" on the page.
Am i doing something wrong? :confused: