Jump to content

Numbers in rows


sith717

Recommended Posts

Don't shout! were not slaves, here to do your bidding!!! I think you just lost any help you were gonna get. Well done :)

 

I'll say this much. You have to use a loop.

 

While (there are lines){

add $loopnum inside a text box;

}

 

That's all you're getting. Good luck!!

Link to comment
https://forums.phpfreaks.com/topic/125002-numbers-in-rows/#findComment-645898
Share on other sites

I'll start you on your way.

 

use this:

$loop = 1;
$limit = 20; ///you have to find a way to make this how many lines there are.

while($loop <= $limit){
echo "<textarea cols='80' rows='25' name='filebody' id='filebody' wrap='soft'>$loop: hey this is a test lol</textarea>"

$loop = $loop +1;
}

 

This will produce 20 lines of "hey, this is a test" all numbered, 1 to 20.

 

Now you gotta figure out how to make it dynamic.

 

A valid point made before is that, those numbers in the page you shown us are not within a text area. They are within a td, or a div/li etc.

 

Hope that helps.

Link to comment
https://forums.phpfreaks.com/topic/125002-numbers-in-rows/#findComment-645939
Share on other sites

If you want it in a text area, you're probably gonna have to make a sized custom background with line numbers... which would kinda suck.

 

The only other way would be JavaScript. As this is so urgent, you may want to check the FreeLance forum and see how cheap you can get it done.

 

I don't help on demand ;)

Link to comment
https://forums.phpfreaks.com/topic/125002-numbers-in-rows/#findComment-645997
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.