I am programming an HTML 10x10 table, each cell with a separate identifier and link. This went on for a long time with copy and paste and change, so I decided to use PHP using the FOR command, which I am not very familiar with.
I am using this code:
<table>
<?php
for ($r=1, $r<10,$r++) {
;echo "<TR>";
for ($d=1, $d<10,$d++) {
echo "<TR id='d" . $d . "r" . $r . "'><a href='javascript: void(0)' onclick='shoot(" . $d . "," . $r . ")'>SHOOT!</a>";
}
echo "<TD>";
}
?>
</table>
PHP says:
Parse error: syntax error, unexpected ')', expecting ';' in C:\xampp\htdocs\****\*****\index.php on line 16
I took off stuf, I do not want you to see.
I am using Windows 7 with XAMPP version 1.7.3
source
share