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

Tell me how is the ternary conditional operator used in php?

811


What Is a Persistent Cookie?

800


Is there an easy way to delete an element from a php array?

685


If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?

663


What is uri routing?

720


armstrong number by using php while number is given by the keyboard.?

1911


What is a lambda function in php?

832


How do you destroy a session?

694


What are variables in research examples?

805


Is php an api?

731


Is json a string php?

695


how to detect a mobile device using php

800


How to create a session? How to set a value in session?

741


What is an abstract class in php?

691


How to create a session? How to set a value in session? How to remove data from a session?

722