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 |
What is http php?
What is $_ request in php?
How can I embed a java program in php file and what changes have to be done in php.ini file?
How to get a total number of elements used in the array?
For image work which library is used in php?
Do you know what is the differences between $a != $B and $a !== $B?
What is difference between static and final in php?
How to check an element is exists in array or not in php?
find highest salary
What is the correct php command to use to catch any error messages within the code?
Do you know when sessions ends?
please send me the interview questions and answers to my mail id : srikanthgovardana@yahoo.com or srikanthgovardana@gmail.com