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 to merge values of two arrays into a single array?
What is the difference between indexed and associative array?
What is the actually used php version?
What is put method in php?
Can php run without apache?
How is it possible to cast types in php?
What is implode() in php?
How to download and install php on windows?
What is the use of trim function in php?
What is the content of /etc directory?
What type of headers that PHP supports?
What is a class in php programing?
Is php 5.6 secure?
What is static variable in php?
What is the use of header() function in PHP? What the Limitation of HEADER()?