Saturday 29 June 2013

Print even numbers in php

<html>
<head>
<title></title>
</head>
<body>
<?php
function even()
{
for($i=0;$i<=100;$i++)
{
if($i%2==0)
{
print "<br/>";
echo $i;
}
}
}
even();
?>
</body>
</html>

No comments:

Post a Comment