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

Reply via email to