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 php regular expression?
Which function is used in php to check the data type of any variable?
What are the different functions in sorting an array?
•How can we submit a form without a submit button
Tell me how can we check the value of a given variable is alphanumeric?
What is put method in php?
What are the main error types in php and how do they differ?
How can we destroy the session, how can we unset the variable of a session?
How to turn on the session support?
Explain a resource?
How to do single and multi line comment in php?
What is the function used to change the root directory in PHP?