Re: extracting data from text file

From: Date: Mon, 01 Jul 2002 21:23:22 +0000
Subject: Re: extracting data from text file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104784@lists.php.net to get a copy of this message
On Monday, July 1, 2002, at 05:17 PM, rdkurth@starband.net wrote:
I have trend this but it does not work properly
        $fp = @fopen(file.txt,"r");
          $line = explode("\n",$fp);
          $valueC = "$line[0]";
          $valueST = "$line[1]";
          @fclose($fp);
What error messages are you getting? I imagine that since you've suppressed the errors with the "@", you will need to remove this to give us any useful information. One other thing, has your file been saved with the appropriate line breaks for your server? In some cases, a file may have DOS/Windows or Macintosh line breaks which are not \n but rather \r\n and \r respectively IIRC. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#104784) next »