<?php echo("<ul>"); for ($i = 0; $i < 10; $i++) { if (gettype($i) == "integer") { $d = (string) $i; echo("<li>" . $d . "</li>"); } } echo("</ul>");