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
Is empty java?
What are the differences between require and include?
How are sessions maintained?
Explain what are some new features introduced in php7?
What is the difference between single quoted string and double quoted string?
How do you check if an arraylist is empty?
How to get best php developer Experience in Php with Sugar CRM / VTiger.
Is c similar to php?
What is session and why do we use it?
Is php a mvc?
How to terminate the execution of a script in PHP?
Why use php artisan serve?
What is a base url?
What does the array operator '===' means?
What is php sequence?