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

Does exist in php?

0 Answers  


How can we convert the time zones using PHP?

1 Answers  


What is the main difference between php 4 and php 5?

0 Answers  


Is php a programming language?

0 Answers  


What does the function get_magic_quotes_gpc() means?

0 Answers  


What is the advantge and disadvantage of mysql_connet() and mysql_pconnect() ? in which condition will you use mysql_connect() and mysql_pconnect().

2 Answers   Avanigoradia,


How can I reverse sort an array keeping the correlation between the index and value?

2 Answers   Rushmore Consultancy,


Explain what is the function file_get_contents() usefull for?

0 Answers  


How many ways there are to fetch the data from the Database?

2 Answers   Tops Technologies,


how we can crop an image and how we can display it..

1 Answers   Satyam,


What does $_files means?

0 Answers  


Is php strongly typed?

0 Answers  


Categories