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 |
Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?
What is a controller php?
What is the meaning of php?
Explain what are some new features introduced in php7?
Which array function checks if the particular key exists in the array?
Code to upload a file in PHP?
Tell me what does the initials of php stand for?
What is string and its function?
How to use validations in php?(codelgniter)
What are the uses of explode() function?
Where session is stored?
What is the maximum size of a table in mysql?