Hi all - new to this board and have a quick question regarding bandwidth.
I made a script using a couple of while statements which generates a 32 wide X 24 high table.
<table>
<?PHP
$blocked = array ("3,11", "3,21");
$y=1;
while ($y<=24) {
echo "<tr>";
$x=1;
while ($x<=32) {
$z=0;
while ($z<=3) {
if (in_array("$x,$y", $blocked)) {
echo "<td bgcolor=red>$x,$y</td>";
$x++;
} else {
echo "<td bgcolor=green>$x,$y</td>";
$x++;
}
$z++;
}
}
echo "</tr>";
$y++;
}
?>
</table>
<?
My question is this:
Although this php script is only around 500bytes large, the HTML page it produces is approximately 25kb. When a browser clicks on this script on my website, what is the bandwidth sent to the browser?
Is my website sending them the 500byte php file and then it is executed on their computer, or does my website send them the 25kb HTML contents?
I've always been curious about that 😉