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

Can a super () and this () keywords be in same constructor?

858


What is meant by public, private, protected, static and final scopes?

984


What is polymorphism php?

934


What does the unset() function means?

1048


What will the ?getdate() function returns in PHP?

1028


Is json a string php?

906


Tell us how can we display the output directly to the browser?

985


Tell me how can you pass a variable by reference?

893


What is the output of the following php code?

884


What is a php tag?

834


How can we display information of a variable and readable by a human with php?

920


What is static in php?

942


Tell me what is the use of mysql_real_escape_string() function?

945


What are the two most common ways to start and finish a php block of code?

1083


How can we check the value of a given variable is a number?

1002