Write a PHP code to print following number pattern:
123
456
789
Answer Posted / rajendra
<?php
$num = "";
for($i=1;$i<=9;$i++) {
$num .= $i;
if($i%3==0){
$num .="<br />";
}
}
echo $num;
?>
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain mail function in PHP with syntax?
What is var_dump function in php?
What is button in html?
Is it more secure to use cookies to transfer session ids?
Explain about require and include function?
What is the static variable in function useful for?
Does php has a future?
Why super () is used in java?
Is php a low level language?
How do I escape data before storing it into the database?
What is input sanitization in php?
What is str_replace()?
Php error constants and their descriptions
What is the function file_get_contents() usefull for?
Which is better python or php?