Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 http php?

0 Answers  


What is $_ request in php?

0 Answers  


How can I embed a java program in php file and what changes have to be done in php.ini file?

0 Answers  


How to get a total number of elements used in the array?

0 Answers  


For image work which library is used in php?

0 Answers  






Do you know what is the differences between $a != $B and $a !== $B?

0 Answers  


What is difference between static and final in php?

0 Answers  


How to check an element is exists in array or not in php?

0 Answers  


find highest salary

8 Answers  


What is the correct php command to use to catch any error messages within the code?

0 Answers  


Do you know when sessions ends?

0 Answers  


please send me the interview questions and answers to my mail id : srikanthgovardana@yahoo.com or srikanthgovardana@gmail.com

0 Answers  






Categories