|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Please help me to number the line!
Hi, Matt
I'm trying to put <a name="lineNumber"> to every line of an input file so that I can refer to any line of that file later from a link <a href="#lineNumber"> Please take a look at this page: http://www.cs.virginia.edu/~hlp4z/index1.php If you enter a few lines in the text area and click the button, the script will echo whatever you've just entered in, exactly the same thing, line by line. And if you view the source code, you'll see I've save the file in html format with <br> and <a name="lineNumber"> in front of each line. However, I can't number the line. Ok, what I want is this: If you enter in something like: This is line 1. This is line 2. This is line 3. Then the script should produce: <a name="line1">This is line 1.</a><br><a name="line2">This is line 2.</a><br><a name="line3">This is line 3.</a><br> and etc.... Could you please give me some idea how to do this? In the script, I save the input into the file system using fwrite and just echo it back to the window. Thanks much. |
|
#2
|
|||
|
|||
|
RE: Please help me to number the line!
Helloooo,
Never mind! I've got it!!! Sorry for bothering. You can delete this post, Matt. --Phan, |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Please help me to number the line! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|