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
Explain what is the difference between mysql_fetch_array() and mysql_fetch_assoc()?
How to retrieve the original query string?
What is the difference between explode and split?
Do you know what's the difference between __sleep and __wakeup?
What u mean by query?
how to track no of users logged in?
Tell me what is the meaning of a final class and a final method?
Tell me how the result set of mysql be handled in php?
What is difference between static and constant in php?
What are getters and setters and why are they important?
What is get method in java?
Where is php code written?
What is the use of mysqli_real_escape_string() function?
Do I need apache for php?
What is php routing?