coffeecup Posted September 19, 2012 Share Posted September 19, 2012 If i knew how to format the topic title i would not be here. the point is to write the code to have a number system for each line of text. each line of text would have a number that comes after the last line. any way, as i read thru Linux docs. i am inspired to create a web site for Linux procedural how to that would have a number 1 through x for each text line, so as to allow any one to comment on any one line number, to correct what ever may be written. i have studied and written Javascript and PHP in the past and do know of the while loop. I could imagine writing the code and could get in there and begin writing it. but the question remains. is it feasible. can it be done. for each end of line char etc. i have been spending a lot of time away from real coding while figuring out Linux so i have forgotten from memory the syntax at this time of writing so i am not able to write it out as if i were in a advanced stage of writing code. so again is it feasible can it be done to write the code to place a numbered system in the left of text for each line of text. thank you. Quote Link to comment https://forums.phpfreaks.com/topic/268541-create-numbers-each-line-left-of-text/ Share on other sites More sharing options...
requinix Posted September 19, 2012 Share Posted September 19, 2012 You're a little vague on the details but the solution may be as simple as an OL. Line 1 Line 2 Line 3 Quote Link to comment https://forums.phpfreaks.com/topic/268541-create-numbers-each-line-left-of-text/#findComment-1379183 Share on other sites More sharing options...
coffeecup Posted September 25, 2012 Author Share Posted September 25, 2012 okay in a multi line HTML markup that spans from the left margin to the right margin. and the text is any where from 20 to 50000 lines long. i would rather use PHP in a AJAX based app. any way it has been some time since i have worked with procedural code. because i have been moving into Linux and learning Linux while i work 10: 30 PM to 6: AM and am becoming burnt out. so i was just wondering if any one had some experience in doing a while loop to place a number system on the left side of the text. along the lines of for each 'end of line char' i do not remember the while loop at this time. after i get Linux down. and i am not working with the GUI. I am going full tilt in in Admin and Apache Admin. i do not wish to waltz into dynamic development on a pink cloud with ignorance as my guide. so it will be a while before i make my way back to procedural coding. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/268541-create-numbers-each-line-left-of-text/#findComment-1380731 Share on other sites More sharing options...
requinix Posted September 25, 2012 Share Posted September 25, 2012 (edited) I'm still not quite sure what you want to do. How about before and after examples? Edited September 25, 2012 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/268541-create-numbers-each-line-left-of-text/#findComment-1380733 Share on other sites More sharing options...
Mahngiel Posted September 25, 2012 Share Posted September 25, 2012 are you talking about wanting line numbers in your shell for when you open documents? Quote Link to comment https://forums.phpfreaks.com/topic/268541-create-numbers-each-line-left-of-text/#findComment-1380928 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.