poisano Posted August 8, 2007 Share Posted August 8, 2007 HI THERE I AM ASKING IF PHP CAN READ like 1 test1 2 test 2 3 test3 php readline and the number 3 and my results would be test3 can it do that Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/ Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 Yes it can do that. You need to be clearer in your explination though. Where are these lines comming from? A file? What? You ranswer could be as simple as... <?php $lines = file('/path/to/file.txt'); echo $lines[2]; ?> However, your question is VERY vague. Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318086 Share on other sites More sharing options...
poisano Posted August 8, 2007 Author Share Posted August 8, 2007 HI THERE I AM ASKING IF PHP CAN READ like page is like <textarea cols="100" rows="10" name="urls"></textarea> i insert about 10 links how can php read the ten links Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318094 Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 There is a link in my signiture, Howto ask questions...., that may help you get a better response. Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318118 Share on other sites More sharing options...
Fadion Posted August 8, 2007 Share Posted August 8, 2007 Poisano ure still not too clear. Are those links going to be like: <textarea cols="100" rows="10" name="url1"></textarea> <textarea cols="100" rows="10" name="url2"></textarea> <textarea cols="100" rows="10" name="url3"></textarea> and u need a code which parses those urls? Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318119 Share on other sites More sharing options...
poisano Posted August 8, 2007 Author Share Posted August 8, 2007 how can i echo all that lines i have requested Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318128 Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 Did you read the link in my signature? Please form a proper question. Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318131 Share on other sites More sharing options...
Fadion Posted August 8, 2007 Share Posted August 8, 2007 lol thorpe, maybe he cant write english very well. Anyway i cant get what u want poisano, maybe its just me, but in each of your post ure saying smth different. Write the whole thing u want, but this time with longer and clearer sentences. Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318144 Share on other sites More sharing options...
teng84 Posted August 8, 2007 Share Posted August 8, 2007 "readline "are you refering java in this statement Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318148 Share on other sites More sharing options...
trq Posted August 8, 2007 Share Posted August 8, 2007 lol thorpe, maybe he cant write english very well. Make that definitely. Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318198 Share on other sites More sharing options...
navjak Posted August 8, 2007 Share Posted August 8, 2007 Hi Poisano, From the image posted, I see that in the text area there are few lines that are getting displayed. All you want is to capture them and echo it. Right?? Tell me from where you are getting the lines displayed. Is it from any file that u get the lines into the text area?? If it is from a file, capture the output of the file into any variable and echo it as said by Thorpe. Even if it is not from any file, you can capture the output and echo it. Now when you post it again, give us the code that you have tried. So that we can help by seeing the code atleast. Quote Link to comment https://forums.phpfreaks.com/topic/63822-can-php-read-lines/#findComment-318348 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.