hi!
I am writing a function that takes two paramaters. the function is supposed to draw a table using the given paramaters as how many rows to write and how many cols to write.
example..
DrawMap(10, 10);
draw a table that's got 10 rows and 10 cols.
here's my function...
Function DrawMap($cellsdown, $cellsacross) {
$height = 10;
$width = 5;
$writetd = "<td width=$width height=$height> </td>";
$writetr = "<tr align=\"center\">";
$finalwrite = "$writetr\n $writetd\n";
echo "<table background=\"/nrgs/images/mapbg.gif\" width=55% cellspacing=3 cellpadding=3 border=1 align=\"center\">\n";
for($i = 0; $i < $cellsacross; $i++) {
echo $finalwrite;
}
}
the function as it is writes 10 rows but one cols.
How do I make it so that it'll write the 10 rows and the 10 cols?
Thanx.
Regards, Stezz.