On Friday 19 July 2002 15:43, Peter wrote:
> You can try this.
>
> <?PHP
>
> $datafile = file("..."); // Here comes your filename
>
> for ($k=0; $k<=count($datafile)-1; $k++) {
>
>   echo "$datafile[$k]<br>"; // Display each line read from datafile
>
> }
>
> ?>

  foreach ($datafile as $line) {
    echo "$line<br>";
  }

is a lot simpler and easier to understand.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I stick my neck out for nobody.
                -- Humphrey Bogart, "Casablanca"
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to