I have a long order form with a text box in each row for quantity of items.
<form method=post>
<tr>
<td><input type=text name=row1 size=5></td>
</tr>
<tr>
<td><input type=text name=row2 size=5></td>
</tr>
</form>
I'm trying to loop through and print out ones that have values. What am I doing wrong below:
<?php
for ($i = 0; $i < 3; $i++) {
$thisRow = $row.$i;
if ($thisRow) {
echo $thisRow;
}
}
?>
When I set $thisRow = $row1, it correctly gives me the value I entered in the form.
Thanks,
Scott