I have the following post variables:
$line_1_09
$line_1_12
$line_1_15
$line_1_18
$line_1_21
$line_2_09
$line_2_12
$line_2_15
$line_2_18
$line_2_21
$line_3_09
$line_3_12
$line_3_15
$line_3_18
$line_3_21
I know from my previous form that of the 15 inputs(posts) 12 are populated. the 12 is stored in variable $populatedrows.
I then want to create a table on my new page
<table>
<?php for ($i=1; $i<=$populatedrows; $i++)
{
?>
<tr>
<td>
<input type="text" value="//first post with information//">
</td>
</tr>
<?php } ?>
</table>
so in this example, if $line_1_09
and $line_1_12
are empty, the first table row input must then be $line_1_15
and so it will continue 'looping' through the next available / populated post variables until the table is equal to $populatedrows
. this will be equal to the number of post variables that contain data.
Strange situation for me so not really sure how to go about it.