First of all I would like to say that I am very new to PHP so maybe it is a stupid question, but there we go: I have a two dropdown select tags that have the following code in html and php:
<select>
<option value="default">---a---</option>
<?php for($i=1; $i<+100; $i++) { ?>
<option value="<?php $i ?>"><?php echo $i ?></option>
<?php } ?>
</select>
<select>
<option value="default">---b---</option>
<?php for($j=1; $j<=100; $j++) { ?>
<option value="<?php $j ?>"><?php echo $j ?></option>
<?php } ?>
</select>
Then I have a table with a row and a column (well at least that has to be changed I mean):
<table>
<tr>
<th>Date</th>
<th>Temp</th>
<th>Nr a</th>
<th colspan="2">a 1</th>
<!--another th___nr a-->
</tr>
<tr>
<td colspan="3"> </td>
<th>something</th>
<th>else</th>
<!--another something else___nr a-->
</tr>
<tr>
<td>
<?php
//echo date(DATE_RFC822);
echo date('jS\, F\, Y');
?>
</td>
<td>
<input type="number" name="temp" placeholder="temp" />
</td>
<th>b 1</th>
<td>
<input type="number" name="something" placeholder="something" />
</td>
<td>
<input type="number" name="else" placeholder="else" />
</td>
<!--another td___nr a-->
</tr>
<!--another tr___nr b-->
</table>
What I want to do is that with the first dropdown to control the number of a's (columns) and with the second dropdown the number of b's (rows). Is this possible with PHP and if it is, how?
I was thinking of somehow to memorize the number we choose in the dropdown into a variable and with some for's to resolve it, but I don't really know how to do it, IF it is possible.
Thank you very much in advance for your time for helping me :)