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



write a program to print [123] [456] [789] note : braces also need to be printed..

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

More PHP Interview Questions

How do you set the browser timeout?

3 Answers  


Tell me what is needed to be able to use image function?

0 Answers  


What is session in PHP. How to remove data from a session?

0 Answers  


what is PHP accelerator ?

2 Answers  


What are the difference between array_keys() and array_key_exists() in php?

0 Answers  


How big is nvarchar max?

0 Answers  


What is the difference between super () and this ()?

0 Answers  


What are the advantages of oops in php?

0 Answers  


What are the Merits and De-Merits of CURL library ?

1 Answers  


Is server side a session?

0 Answers  


Which php framework is fastest?

0 Answers  


Is salary fixed or variable cost?

0 Answers  


Categories