read a value written in the first tab of the last line of a text file where values are separated by "\t"?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • aa

    read a value written in the first tab of the last line of a text file where values are separated by "\t"?

    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"?


  • Alvaro G Vicario

    #2
    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
    --

    Comment

    • aa

      #3
      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



      Comment

      • Shawn Wilson

        #4
        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.

        Shawn
        --
        Shawn Wilson
        shawn@glassgian t.com

        Comment

        • aa

          #5
          Thanks

          Thanks


          Comment

          Working...