Write a PHP code to print following number pattern:
123
456
789
Answer Posted / sam
<?php
$num = "";
for($i = 1; $i<=9; $i++ )
{
if($i%3 == 1)
{
echo "<br />";
}
echo $i;
}
?>
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Does PHP 5 support exceptions? State Whether True or False?
Does php 7 support mysql?
Is php easy language to learn?
What is split function in php?
iam mca post graduate in 2010 not getting job in JAVA so iam looking for carear in php as market demand is high so it is best option to try for php or not
Tell me how to execute an sql query? How to fetch its result?
Tell me what type of operation is needed when passing values through a form or an url?
What type of headers that PHP supports?
What is final class and final method in php?
Explain which cryptographic extension provide generation and verification of digital signatures?
How send email in php?
What is abstract class php?
Do you know what does $globals means?
How do I expire a php session after 30 minutes?
Explain php parameterized functions.