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
Can you extend a final defined class?
Explain me what are the main error types in php and how do they differ?
What is cookie in php with example?
What are include() and require() functions?
Describe session in php.
Is salary fixed or variable cost?
What is $this in php?
What is the main function of php?
Explain soundex() and metaphone().
How to connect to mysql from a php script?
How can we create a database using php?
How are cookies created?
Write a program to show the joining of two strings in php?
How is it possible to propagate a session id?
Why sessions are used in php?