I need to write a script which can display an XHTML table with a numeric value displayed in each table cell. The script should use a nested loop construct and should be able, by changing the value of two variables (for example, $intWidth and $intHeight). to adjust the size of the table. This is what I have:
<?php
$i =1;
while($i<=8) {
if($i%4==1) {
echo "<tr>";
}
echo "<td>".$i."</td>";
$i++;
if($i%4==1) {
echo "</tr>";
}
}
?>
</table>
burt.munn 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.