1
1 2
2 3 4
4 5 6 7
7 8 9 10 11
<?php
$n=5;$a = 1;
for ($i = 1 ; $i <= $n ; $i++ )
{
for ( $c = 1 ; $c <= $i ; $c++ )
{
if($c!=1)
$a++;
printf("%d ",$a);
}
printf("</br>");
}
?>
1 2
2 3 4
4 5 6 7
7 8 9 10 11
<?php
$n=5;$a = 1;
for ($i = 1 ; $i <= $n ; $i++ )
{
for ( $c = 1 ; $c <= $i ; $c++ )
{
if($c!=1)
$a++;
printf("%d ",$a);
}
printf("</br>");
}
?>
=1;$j--){
ReplyDeleteecho $j;
}
echo '
';
$i--;
}
?>
Will O/p in following format....
54321
4321
321
21
1