Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / akashumate

<? php

$i=1;

while($i<=3)
{
echo $i;
$i++;
}
echo "<br>" ;
$j=$i;
while($j<=6)
{
echo $j;
$j++;
}
echo "<br>" ;

$k=$j;
while ($k<=9)
{
echo $k;
$k++;
}
echo "<br>" ;

? >

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the changes in php versions?

1025


What does addslashes do in php?

1114


What is the use of $_server["php_self"] variable?

1066


How does firefox manage cookies?

1040


Which is faster for or foreach?

1001


What are the new features in php 7?

1053


What is mvc? Why its been used?

991


Where php language is used?

1043


What is rtrim php?

1071


How to get the ip address of the client?

9221


What is x+ mode in fopen() used for?

1100


What is the use of htmlspecialchars in php?

1048


Is age an interval or ratio?

1008


What is namespace and use in php?

1045


How to return a value back to the function caller?

1096