|
![]() |
#12 |
bang bang
|
code...
If when you copy everything from nats 4 it gets it's own line this helps make it into a table.
You just enter the amount of columns there are and then in the text area paste what you copied from nats 4. maybe it will help you. disclaimer: i wrote this in 10 minutes. it's a hack. I make no claims that this code rox or is sexy in anyway, I'm not sure if it's even secure. Here it is for what it is. ![]() edit: copy n paste the code into a file called mootime.php or you are going to have to edit the action on the form to whatever you name the .php file. Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>moo</title> </head> <body> <?php if ($_SERVER['REQUEST_METHOD'] == "POST") { $numofcols = $_POST['colnumber']; $text = explode("\n", $_POST['bahbah']); $currentcol = "1"; ?> <table border="2" cellpadding="1" cellspacing="2"> <?php foreach ($text as $line) { if ($currentcol == "1") { echo "<tr>"; } echo "<td>$line</td>"; $currentcol++; if ($currentcol > $numofcols) { echo "</tr>"; $currentcol = "1"; } } ?> </table> <?php } else { ?> <form method="post" action="mootime.php"> Enter number of columns: <input type="text" size="3" name="colnumber" /><br /> <textarea name="bahbah" cols="20" rows="30"></textarea> <br /> <input type="submit" name="submit" value="moo" /> </form> <?php } ?> </body> </html> |
![]() |
![]() |
|
|