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 program to print
[123]
[456]
[789]
note : braces also need to be printed

Answer Posted / soujj

$countr = 0;
for($i=1;$i<=9;$i++)
{
$countr++;
$str[] = $i;
if($countr % 3 == 0)
{
echo "[";
for($j=0;$j<=2;$j++)
{
echo $str[$j];
}
echo "]";
$str=array();
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why php was called as personal home page?

972


What is the use of the function htmlentities?

1103


Can we override static method in php?

1076


What is a static variable in php?

1059


Does wordpress run on php 7?

968


What is the current stable version of php?

1039


How to pass an argument to a function?

1224


How we get browser details of clients machine?

1045


What is php pathinfo?

1089


What is session_start () in php?

987


How can we submit from without a submit button?

1006


How do functions work?

1113


What is mysql_real_escape_string used for?

981


What is $_ server request_method == post?

1062


Why do you need to filter out empty files?

924