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 'float' property in css?
How can we access the data sent through the url with the post method?
How to check a key exist in an array?
What is isset function in php?
What does $_server mean?
What is the meaning of symbol '$' in jquery?
Why do we use interface in php?
How do you use bcrypt for hashing passwords in php?
Where is session id stored?
Is overloading possible in php?
why did u want to leave your past organisation?
Is it possible multiple inheritance in php?
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
How the web server interprets php and interacts with the client?
Tell me how a constant is defined in a php script?