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 variable and data type?
Does php support overloading?
Explain what is the difference between session and cookie?
How do you trim spaces in excel?
What is the use of count() function in php?
What websites use php?
Is php pass by reference or value?
Why do we use polymorphism in php?
What is the integer?
What are the final class and final method?
Which method removes the last element from the end of an array?
What are the differences between session and cookie?
How to read the entire file into a single string?
What is polymorphism?
Which function is used to read a file removing the html and php tags in it upwork?