<?php
$table = '';
function PrintTable($rows, $cols)
{
global $table;
$table .= "<table width='700' border='1'>";
for ($i=1;$i<$rows;$i++) {
$color = $i % 2 == 0 ? 'green' : 'orange';
$table .= "<tr bgcolor='$color'>";
for ($j=1;$j<$cols;$j++) {
$table .="<td>xxoo</td>";
}
$table .= "</tr>";
}
$table .= "</table>";
return $table;
}
echo PrintTable(10, 10);
?>