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

Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?

0 Answers  


Why do we use polymorphism in php?

0 Answers  


How to call php function in jquery?

0 Answers  


Is polymorphism inherited?

0 Answers  


What are escaping characters?

0 Answers  


Applications written to provide a GUI shell for Unix and Linux are called

0 Answers  


Is php fully object oriented?

0 Answers  


What is $_ get in php?

0 Answers  


How do you connet mysql database with php?

0 Answers  


Why print_r is used in php?

0 Answers  


Does php support function overloading?

0 Answers  


What is $_ post in php?

0 Answers  


Categories