Re: Something wrong with the file() command.
| From: | Fred | Date: | Mon, 03 Dec 2001 17:58:13 +0000 |
| Subject: | Re: Something wrong with the file() command. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76396@lists.php.net to get a copy of this message | ||
When you attempt to print or echo an array the result is simply "array".
You have to iterate through the elements of the array to see what each
element contains. Read the array chapter in the manual for more
information.
Fred
Jose <josefga@olinet.es> wrote in message
news:20011203161828.88986.qmail@pb1.pair.com...
> I try to give it a value with a var, but it doesn't work.
>
> The code is something like this.
>
> $y=str_pad($y,5,".txt"); \\ To give it a filename from a var that contains
> only 1 number (with 1 digit)
> If in this step I do a "echo $y, it shows the correct string. Suposing it
is
> 2, it shows 2.txt
>
> $temp[]=file($y); \\ To load the file into the array.
>
> But after the file nothing happens, the array only contains "Array".
>
> Sorry for my bad english.
> Jose.
>
> Olinet S.L.
>
>