Write a PHP code to print following number pattern:
123
456
789
Answer Posted / ronak sharma
<?php
$count=0;
for($i=1;$i<=3;$i++)
{
for($j=1;$j<=3;$j++)
{
$count++;
echo $count;
}
echo "<br>";
}
?>
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why is php so popular?
Tell me what is the use of "enctype" attribute in a html form?
Can we use onclick in submit button?
What is php session start?
What is cookie in php with example?
How long is csrf token?
Explain about getters and setters in php?
Which is correct about mysqli and pdo?
What is php variable?
How many ways to include variables in double-quoted strings in php?
What is the function func_num_args() used for?
What is php constructor?
When viewing an html page in a browser, the browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
How to replace a text in a string with another text in php?
Which function gives us the number of affected entries by a query?