Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Star Loop



$levels = 10;
$output = array();
for ($i = 1; $i <= $levels; $i = $i + 2) {
/*echo $i;
 echo "<br>";*/
$whitespace = ($levels - $i / 2);
 echo "<br>";
 $output[] = str_pad('', $whitespace, "-") . str_pad('', $i, '*');
}
/*echo "<pre>";
print_r($output);*/
echo implode("<br>", $output);
echo "<br>";
echo implode("<br>", array_reverse($output));
/*echo"<pre>";
print_r(array_reverse($output));*/
echo "<br>";
?>


This post first appeared on What Is AJAX.?, please read the originial post: here

Share the post

Star Loop

×

Subscribe to What Is Ajax.?

Get updates delivered right to your inbox!

Thank you for your subscription

×