I always look in the manual first.  I guess I missed it.

Thanks


-----Original Message-----
From: Mikey [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 15, 2003 10:42 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Reading in text file characters

You could try using the substr() function, it will take any number of
chars
from any place in a string.  However, I think you could have found this
had
you been bothered to look in the manual first...

HTH,

Mikey


> -----Original Message-----
> From: Nichols, Mark A. [mailto:[EMAIL PROTECTED]]
> Sent: 15 January 2003 15:17
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Reading in text file characters
>
>
> The following code reads in a text file one line at a time.
>
>
>
> for ($k=0; $k<=count($readfile)-1; $k++) {
>
>             $fields = split("\t",$readfile[$k]);
>
>             echo nl2br("$fields[0]<br>");
>
>
>
> }
>
>
>
> The problem is that it seems to strip the empty spaces out.
>
>
>
> My text file is formatted by lengths.  I need to read the first 25
> characters from the text file.  Then read 50 more... And so on.
>
>
>
> Can anyone give my the code for reading in a certain number of
> characters from a text file.
>
>
>
> Thank you in advance.
>
>



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


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

Reply via email to