Write a PHP code to print following number pattern:
123
456
789
Answer Posted / akashumate
<? php
$i=1;
while($i<=3)
{
echo $i;
$i++;
}
echo "<br>" ;
$j=$i;
while($j<=6)
{
echo $j;
$j++;
}
echo "<br>" ;
$k=$j;
while ($k<=9)
{
echo $k;
$k++;
}
echo "<br>" ;
? >
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain the changes in php versions?
What does addslashes do in php?
What is the use of $_server["php_self"] variable?
How does firefox manage cookies?
Which is faster for or foreach?
What are the new features in php 7?
What is mvc? Why its been used?
Where php language is used?
What is rtrim php?
How to get the ip address of the client?
What is x+ mode in fopen() used for?
What is the use of htmlspecialchars in php?
Is age an interval or ratio?
What is namespace and use in php?
How to return a value back to the function caller?