Sir , I am a php learner i want to make a php program by which i can show star arrangement like this ***** **** *** ** * Any body can help me . Thank you pradip
$max = 5; $min = 1; for($x = $max;$x >= $min; $x--){ for($y = $min;$y <= $x; $y++){ echo ($y != $x)?' * ':' * <br>'; }//end for }//end for PHP: Hope it's help.
The following code also works perfectly: <?php for ( $counter = 5; $counter >= 1; $counter -= 1) { for($j=1; $j<=$counter; $j+=1) { echo "*"; } ?> </br> <?php } ?>
Thanks this is great idea you have supplied. I am really enjoying dp to learn php. Thanks a lot all of you for helping me a lot.