Re: read a value written in the first tab of the last line of a text file where values are separated by "\t&quo t;?
*** aa wrote/escribió (Fri, 19 Nov 2004 15:40:20 -0000):[color=blue]
> How do I read a value written in the first tab of the last line of a text
> file where values are separated by "\t"?[/color]
You'll find this function useful:
Usage: array explode ( string separator, string string [, int limit] )
Purpose: Split a string by string
Availability: PHP 3, PHP 4
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Re: read a value written in the first tab of the last line of a text file where values are separated by "\t&quo t;?
Thanks.
So it id not possible to read it directly and I have to read the whole line
and then parse it
Then how shall I read a necessary line? I can't find a function accepting
the line No as a parameter
Re: read a value written in the first tab of the last line of a textfile where values are separated by "\t&quo t;?
aa wrote:[color=blue]
>
> So it id not possible to read it directly and I have to read the whole line
> and then parse it
> Then how shall I read a necessary line? I can't find a function accepting
> the line No as a parameter[/color]
You could use file() (returns array of lines). Then just use the last item in
the array.
Comment