Write a PHP code to print following number pattern:
123
456
789
Answer Posted / sam
<?php
$num = "";
for($i = 1; $i<=9; $i++ )
{
if($i%3 == 1)
{
echo "<br />";
}
echo $i;
}
?>
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is $$ in php?
What is the function to count elements in an array in PHP?
Why use php artisan serve?
What the difference between the 'bitwise and' operator and the 'logical and' operator?
Is python better than php?
Does session expire on closing browser?
What is the purpose of break and continue statement?
What are the functions for imap?
Tell me what are the encryption techniques in php?
How do you check if a variable has not been set in php?
What is the tags in PHP is not a valid way to begin and end a PHP code block?
What is c++ polymorphism?
What are the three parts of an http request?
How can I load data from a text file into a table?
Why do we need abstract class in php?