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
What is the function file_get_contents() useful for?
Write a program to find no of days between two dates in php?
Which is better python or php?
What is overloading and overriding in php?
When is a conditional statement ended with endif?
How do you identify independent and dependent variables in research?
Is php a low level language?
How does php and apache work?
How can image properties be retrieved in php?
Is rent a variable cost?
What is csrf cookie?
What is the main difference between asp net and php?
How stop the execution of a php scrip?
How to call php function in jquery?
What is the difference between characters 34 and x34?