just a thought, mac line break is "\r" you can open and save it as unix that should get rid of the weird problem, unless you need it to work for numerous uncotrolled file flow, then replacing "\r" might work with a FOR loop. You might have to fwrite to a new file there "\r" will become "\n" and have that be processed as a continuum of the same script.
R> >Rodrigo Peres wrote: >> Hi list, >> >> I'm in a problem that is driving me crazy!!! I want open a file and puts >> each line into an array, but this files was created in macintosh!! so >> the file() can't recognize the end line and only outputs 1 element in >> array!! How can I solve it. I tried to fread() the file and >> eregi_replace the line breaks, it worked, but now I don't know how to >> use this to create the array! >> > >You can use split(). >I think Mac linebreak is better to be recognized by PHP... > >-- >Yasuo Ohgaki > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > ________________________--__-______-______________ eat pasta type fasta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php