Re: Grabbing data up to \n
| From: | Wagner Tomy | Date: | Fri, 27 Jul 2001 15:14:46 +0000 |
| Subject: | Re: Grabbing data up to \n | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59961@lists.php.net to get a copy of this message | ||
$data = file("myfile");
$data = array of the lines from myfile ( they still contain the newline
character )
Wagner Tomy
Editus Luxembourg S.A.
----- Original Message -----
From: "Jeff Lewis" <jeff@hyrum.net>
To: <php-general@lists.php.net>
Sent: Friday, July 27, 2001 5:14 PM
Subject: [PHP] Grabbing data up to \n
I am grabbing lines of a file using:
$buffer = fgets($fd, 4096);
How can I grab the line up to \n or does this do it? Like if the line is
only a few characters, it will only grab up to \n?
And if the line up to the \n is a huge message will I still be able to grab
all of it with the 4096?
Jeff