adding a <br> tag in the middle of a loop
| From: | Rodney Davis | Date: | Wed, 18 Oct 2000 21:12:53 +0000 |
| Subject: | adding a <br> tag in the middle of a loop | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20984@lists.php.net to get a copy of this message | ||
I am trying to output a given number of <input> tags
based on a variable with the following code:
<?php
for ($i = 0; $i < $number; $i++)
{
echo "<input type=\"text\" name=\"variable[]\"
size=\"15\">";
}
?>
But, if $number is a large number I get a huge string of
<input> tages. I would like to break these every three
iterations but I have no idea how to do this. Does
anyone know how to do this?
Thanks in advance
rodney