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 / 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


Please Help Members By Posting Answers For Below Questions

What is $$ in php?

913


What is the function to count elements in an array in PHP?

1052


Why use php artisan serve?

906


What the difference between the 'bitwise and' operator and the 'logical and' operator?

921


Is python better than php?

961


Does session expire on closing browser?

857


What is the purpose of break and continue statement?

927


What are the functions for imap?

1066


Tell me what are the encryption techniques in php?

886


How do you check if a variable has not been set in php?

882


What is the tags in PHP is not a valid way to begin and end a PHP code block?

1182


What is c++ polymorphism?

921


What are the three parts of an http request?

929


How can I load data from a text file into a table?

952


Why do we need abstract class in php?

904