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
Explain what is the function file_get_contents() usefull for?
What is difference between mysqli and mysql?
What is singleton class in php?
Explain me what is the use of 'print' in php?
What is difference between mysql_fetch_array and mysql_fetch_assoc?
Is php fully object oriented?
How is session id stored in browser?
Write a program to upload a file in php?
How can you declare the array in php?
What are the differences between mysqli_connect and mysqli_pconnect?
What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
Is PHP an open source software?
What are the advantages of php mysql?
What does sign mean php?
What is the use of isset() in php?