Skip to content

Instantly share code, notes, and snippets.

@wingyplus
Created July 11, 2011 08:34
Show Gist options
  • Save wingyplus/1075517 to your computer and use it in GitHub Desktop.
Save wingyplus/1075517 to your computer and use it in GitHub Desktop.
for mid exam
<?php
$start = 2;
$end = 12;
echo "<pre>1234567890123456789012345678901234567890";
for ($i = 1; $i <= $end; $i++) {
if ($i >= 10)
echo "<br>&nbsp;&nbsp;&nbsp;$i&nbsp;&nbsp;&nbsp;$i";
else
echo "<br>&nbsp;&nbsp;&nbsp;&nbsp;$i&nbsp;&nbsp;&nbsp;&nbsp;$i";
for ($j = $start; $j <= 6; $j++) {
if ($i * $j >= 10) {
echo "&nbsp;&nbsp;&nbsp;" . $i * $j;
} else {
echo "&nbsp;&nbsp;&nbsp;&nbsp;" . $i * $j;
}
}
}
echo "</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment