I can make the table perfectly if it's from A-Y but when it if I change it to 'Z', it won't work anymore.
Does anybody know the problem?
<table border="1">
<?php
for($row=1; $row<=22; $row++){
echo "<tr>";
for($column="A"; $column <= "Y"; $column++){
echo "<td> $row $column </td>";
}
echo "</tr>";
}
?>
</table>
You can try with:
<table border="1">
<?php
for ($row=1; $row <= 22; $row++){
echo "<tr>";
foreach (range('A', 'Z') as $column){
echo "<td> $row $column </td>";
}
echo "</tr>";
}
?>
</table>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With