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
How can we calculate the similarity between two strings?
How to define a function with any number of arguments?
How to assigning a new character in a string?
What can php do?
What is namespace in php?
What does echo mean in php?
Can we run php in apache tomcat?
Tell me what types of loops exist in php?
What is use of header() function in php?
Tell me how can you pass a variable by reference?
Explain some most commonly use string functions in php?
What are sql injections, how do you prevent them and what are the best practices?
sort term descripttion form, report and uery
What are php applications?
What is htmlentities function in php?