File Trouble

From: Date: Mon, 24 Feb 2003 20:41:07 +0000
Subject: File Trouble
Groups: php.general 
Request: Send a blank email to php-general+get-136975@lists.php.net to get a copy of this message
Hello All I am trying to load the contents of a file stored on the server in to an array. The file has 125 or so lines. However when I load the file into the array and try to print the array elements..all I see is one continuos line. $PASSPORT_CODES=file("../GUEST/list.txt"); if(!$PASSPORT_CODES) {
     echo "File could not be read by the system !! <br>";
     exit;
} else echo "File was opened !!<br>"; $x = count($PASSPORT_CODES); echo "Count is : $x<br>"; for($i=0; $i<count($PASSPORT_CODES); $i++){ echo "$PASSPORT_CODES[$i]"; echo "<br>"; } Can you please help me out with this.... I need to get a 125 element array...so that my code can check the individual elements of the Array. Thanks in advance Pushpinder Singh Garcha _________________________________ Web Architect

« previous php.general (#136975) next »