Write a PHP code to print following number pattern:
123
456
789

Answer Posted / sheetal

<?php
$k=1;
while($k<9)
{
for($i=1;$i<=3;$i++)
{
echo $k;
$k++;
}
echo "</br>";
}
?>

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you encrypt password using php?

754


What is the main difference between php 4 and php 5?

759


Php code to find whether a number armstrong or not?

739


What is the difference between apache and tomcat?

793


What new features php7 has in store for us?

782


List data types in PHP?

747


What is memcache?

735


What is difference between require_once(), require(), include()?

719


When to use self over $this?

764


What is polymorphism?

2293


What is cookie and session in php?

715


What is the use of curl()?

849


How arrays are used in php?

792


What is overloading and overriding in oop?

783


How to read and display a HTML source from the website url?

746