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 difference between rest and http?
Can you define an argument as a reference type?
What are the new features available in php 7?
How long should a session last?
What is the meaning of php?
Explain the purpose of output buffering in php.
What is a namespace in php?
What is use of header() function in php? What the limitation of header()?
What are the string functions in php?
How can we upload a file in php?
Why do you need to filter out empty files?
Is php a backend?
Can we use php variable in javascript?
How do I escape data before storing it in the database?
What is overriding in php?