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
What is the difference server side and browser side validation?
What is difference between require_once(), require(), include()?
What is a PHP Filter?
Tell me how do you execute a php script from the command line?
Is age interval or ordinal?
What are the two main string operators?
What is the use of anonymous function in php?
With a heredoc syntax, do I get variable substitution inside the heredoc contents?
What are the rules to declare a php variables?
Which function gives us the number of affected entries by a query?
How to create connection in php?
Php being an open source is there any support available to it?
How would you determine the size of a file in php?
Do I need apache for php?
How do I end a php session?