normal way is: if (is_file($fname)) foreach (file($fname) as $line) echo "line is: $line <br>";
----- Original Message ----- From: "Gordon Stewart" <[EMAIL PROTECTED]> To: <php-list@yahoogroups.com> Sent: Thursday, July 14, 2005 11:34 AM Subject: Re: [php-list] Array Explode > On 7/14/05, Patrick Bierans <[EMAIL PROTECTED]> wrote: >> Maybe the content of the file only contains theese 5 letters "A R R A Y" >> ? >> >> Jokin'... >> >> after $text=file($nameoffile) do a print_r($text); to see if it is >> working. > > > echo "T - '$temp'\n"; > > $red=file($temp); > echo "RED - '$red'\n"; > > $pieces1 = explode("\n", $red); > > echo "==========\n"; > print_r($pieces1); > echo "==========\n"; > > the print_r now shows :- > > ========== > Array > ( > [0] => Array > ) > ========== > > But the name of the file IS correct - & there is text (headers of an > email) in it... > > (re-looking) > > -- > > G Stewart > NZ community groups - [EMAIL PROTECTED] > > > Community email addresses: > Post message: php-list@yahoogroups.com > Subscribe: [EMAIL PROTECTED] > Unsubscribe: [EMAIL PROTECTED] > List owner: [EMAIL PROTECTED] > > Shortcut URL to this page: > http://groups.yahoo.com/group/php-list > > > > -------------------------------------------------------------------------------- > YAHOO! GROUPS LINKS > > a.. Visit your group "php-list" on the web. > > b.. To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > -------------------------------------------------------------------------------- > > Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/