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
Why php was called as personal home page?
What is the use of the function htmlentities?
Can we override static method in php?
What is a static variable in php?
Does wordpress run on php 7?
What is the current stable version of php?
How to pass an argument to a function?
How we get browser details of clients machine?
What is php pathinfo?
What is session_start () in php?
How can we submit from without a submit button?
How do functions work?
What is mysql_real_escape_string used for?
What is $_ server request_method == post?
Why do you need to filter out empty files?