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
Tell me how can we automatically escape incoming data?
What is mvc? Why its been used?
What is a trait in php?
What does $_server mean?
Tell us what does $_cookie means?
Does php support inheritance?
How To Get the Uploaded File Information in the Receiving Script?
What is php call function?
What are getters and setters php?
Tell me how to set a page as a home page in a php based site?
What is include in php?
Is php harder than javascript?
What is htaccess in php?
What is difference between include,require,include_once and require_once()?
What is config file in php?