RE: [PHP] Array Creation

2002-01-10 Thread Ford, Mike [LSS]
> -Original Message- > From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] > Sent: 09 January 2002 20:56 > > > while (!feof ($fp)) { > > $line = fgets($fp, 4096); > > $data = explode(",", str_replace("\"", "", $line)); //using > > str_replace to get rid of quote marks > >

Re: [PHP] Array Creation

2002-01-09 Thread Bogdan Stancescu
Also, make sure you get rid of the space at the beginning of $data[1] - the space after the comma gets in there, so either use trim() or just trim the first character programatically ($data[1]=substr($data[1],1)). Bogdan Jamison Roberts wrote: > What I have is a text file that has data in the f

Re: [PHP] Array Creation

2002-01-09 Thread Bogdan Stancescu
> while (!feof ($fp)) { > $line = fgets($fp, 4096); > $data = explode(",", str_replace("\"", "", $line)); //using > str_replace to get rid of quote marks >//following line to see if data is correct > echo $data[0]." ".$data[1].""; $theArray[$data[0]]=$data[1]; > >