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
Can a super () and this () keywords be in same constructor?
What is meant by public, private, protected, static and final scopes?
What is polymorphism php?
What does the unset() function means?
What will the ?getdate() function returns in PHP?
Is json a string php?
Tell us how can we display the output directly to the browser?
Tell me how can you pass a variable by reference?
What is the output of the following php code?
What is a php tag?
How can we display information of a variable and readable by a human with php?
What is static in php?
Tell me what is the use of mysql_real_escape_string() function?
What are the two most common ways to start and finish a php block of code?
How can we check the value of a given variable is a number?