Re: array problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You are echoing out an array. If you use something like print_r() or var_dump() you will see the array elements
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Marc Fromm <Marc.Fromm@xxxxxxx> wrote:

I am reading a csv file into an array. The csv file.

users.csv file contents:
w12345678,a
w23456789,b
w34567890,c

$csvfilename = "users.csv";
$handle = fopen($csvfilename, "r");
if($handle) {
while (($line = fgetcsv($handle, 1000, ",")) !== FALSE) {
$arrUsers[] = $line;
}
fclose($handle);
}

When I echo out the elements in the elements in the array $arrUsers I get:
Array
Array
Array

foreach ($arrUsers as $user){
echo $user . "<br />";
}

I can't figure out why the word Array is replacing the actual data.


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux