Page 1 of 1

using file()

Posted: Wed May 13, 2009 12:49 pm
by misfitxnet
When I use file() on a text file,
with the format of $a."/t".$b, etc etc,
so that I may turn it into an array

I cannot return any of the values of the new array
the only return value i get in the browser is "Array"
And that is it.

Is there a way to work with files or arrays like this?

Re: using file()

Posted: Wed May 13, 2009 2:12 pm
by s.dot
file() will take each line of the file and make it an element in the array
use print_r() to show arrays in your browsers
if you're using a tab delimited file, fgetcsv() may be a better choice for you