just-j Posted July 25, 2006 Share Posted July 25, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/15549-who-do-i-read-a-paticular-line-from-text/ Share on other sites More sharing options...
trq Posted July 25, 2006 Share Posted July 25, 2006 [quote]i need to read the line after the one the foreach loop is on[/quote]Then iterate to the next line. Quote Link to comment https://forums.phpfreaks.com/topic/15549-who-do-i-read-a-paticular-line-from-text/#findComment-63184 Share on other sites More sharing options...
just-j Posted July 25, 2006 Author Share Posted July 25, 2006 i really dont know how to do that.. Quote Link to comment https://forums.phpfreaks.com/topic/15549-who-do-i-read-a-paticular-line-from-text/#findComment-63189 Share on other sites More sharing options...
just-j Posted July 25, 2006 Author Share Posted July 25, 2006 i got it... thanks Quote Link to comment https://forums.phpfreaks.com/topic/15549-who-do-i-read-a-paticular-line-from-text/#findComment-63190 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.