Re: [PHP] array looping

2003-08-14 Thread Liam Gibbs
I get all the content of file, so everything is in array 0. I need to somehow break up the array by the comma. Wouldn't it be $file_contents = explode(,, $file_contents[0]); as in you've forgotten the array element? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] array looping

2003-08-14 Thread Micah Montoy
I have this text file that I pull in and I need to transverse through the file and assign each value in the file into an array. The text in the file is separated by a comma. I was thinking of something along the lines of explode but its only for strings and I couldn't get it to work with arrays.

Re: [PHP] array looping

2003-08-14 Thread Micah Montoy
No, one long file. I can separate it out any way though. Any ideas? Chris W. Parker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Micah Montoy mailto:[EMAIL PROTECTED] on Tuesday, August 12, 2003 3:35 PM said: I have this text file that I pull in and I need to transverse

RE: [PHP] array looping

2003-08-14 Thread Chris W. Parker
Micah Montoy mailto:[EMAIL PROTECTED] on Tuesday, August 12, 2003 3:35 PM said: I have this text file that I pull in and I need to transverse through the file and assign each value in the file into an array. Hehe... you mean traverse. Transverse: 1 : acting, lying, or being across : set

Re: [PHP] array looping

2003-08-14 Thread Micah Montoy
You where right. I realized this a bit after I posted. I got it going once I realized what I had forgotten. thanks everyone for your input Liam Gibbs [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I get all the content of file, so everything is in array 0. I need to somehow

Re: [PHP] array looping

2003-08-14 Thread Micah Montoy
When I tried the $file_contents = explode(,,$file_contents); I get the error: Notice: Array to string conversion in c:\inetpub\wwwroot\webpage10\example\search\dsp_search.php on line 111 When I do echo ($file_contents); the output is Array. When I do echo ($file_contents[0]); I get all