Jump to content


Photo

who do i read a paticular line from text??


  • Please log in to reply
3 replies to this topic

#1 just-j

just-j
  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 25 July 2006 - 12:03 AM

ive searched for about 30 minutes on google and cant figure out how to read a line from text..  say i want to set line 15 from textfile.txt to a variable?  i did a foreach ($lines as $line_num => $line) loop to read the entire file line by line but i am making a table for the text that it reads and in order for it to work, i need to read the line after the one the foreach loop is on, in order to set the rowspan of the table.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 25 July 2006 - 12:05 AM

i need to read the line after the one the foreach loop is on

Then iterate to the next line.

#3 just-j

just-j
  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 25 July 2006 - 12:34 AM

i really dont know how to do that..

#4 just-j

just-j
  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 25 July 2006 - 12:41 AM

i got it...  thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users