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
How can we destroy the cookie in php?
What are the advantages of php mysql?
What are the differences between php constants and variables?
What is php full form?
Does session expire on closing browser?
What is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
Is php difficult to learn?
What is php artisan serve?
What is php session id?
How to access a Static Member of a Class in PHP?
What is php? Why it is used?
Tell me what is htaccess?
What is php oops concepts?
How do I end a php session?
How the web server interprets php and interacts with the client?