write a program to print
[123]
[456]
[789]
note : braces also need to be printed
Answer Posted / 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 View All Answers
List some sorting functions in php?
How to get the IP address of the client/user in PHP?
Is null function in php?
what is constructor
Does php support overloading?
How to store the uploaded file to the final location?
What is difference between web service and api?
Is key in array php?
How does firefox manage cookies?
What is mvc? Why its been used?
What is the Pipe Symbol represented?
How to delete file in php?
What is the purpose of php?
Explain type casting and type juggling.
Explain the importance of the function htmlentities.