Re: detecting end of line - php 4.1.2

From: Date: Fri, 21 Mar 2003 23:03:04 +0000
Subject: Re: detecting end of line - php 4.1.2
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140643@lists.php.net to get a copy of this message
> I am trying to get php 4.1.2 to read a Mac file (exported from > FileMaker Pro) and split it into different lines using the following > but php does not recognize the end of line. For some tech reason I > cannot upgrade php now but I need to be able to read my Mac files > now. What is the easiest : edit the Mac file and replace the end of > line or modify the script below? In any case I need help to know > exactly what to do. > > // first read the entire file > $file = file($Export_ImageBank); I know Macs use \r as the end of line. file() may only look for \n. You can read the entire file into a variable and then use explode() on \r to achieve the same results as file(). ---John Holmes...

« previous php.general (#140643) next »