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 php built on?
Can php replace javascript?
Explain about PHP filter and why it should be used?
Explain what is the difference between $var and $$var?
Do while loops php?
What is a namespace in php?
What is good average session duration?
How to create a session? How to set a value in session?
What is lazy loading in php?
What is php.ini & .htacess file?
What is the major php security hole? How to avoid?
Is php faster than python?
How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain
Tell me are parent constructors called implicitly inside a class constructor?
Tell me is it possible to submit a form with a dedicated button?