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

What is php regular expression?

0 Answers  


Which function is used in php to check the data type of any variable?

0 Answers  


What are the different functions in sorting an array?

2 Answers  


•How can we submit a form without a submit button

5 Answers  


Tell me how can we check the value of a given variable is alphanumeric?

0 Answers  


What is put method in php?

0 Answers  


What are the main error types in php and how do they differ?

0 Answers  


How can we destroy the session, how can we unset the variable of a session?

5 Answers  


How to turn on the session support?

0 Answers  


Explain a resource?

0 Answers  


How to do single and multi line comment in php?

0 Answers  


What is the function used to change the root directory in PHP?

0 Answers  


Categories