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 |
How To Get the Uploaded File Information in the Receiving Script?
What is needed to be able to use image function?
in PHP for pdf which library used?
How can we check the value of a given variable is a number?
How can I execute a PHP script using command line?
How long is a php session valid?
What is the capacity of mysql database?
How do you use bcrypt for hashing passwords in php?
Tell me how can we determine whether a variable is set?
How can we encrypt the username and password using PHP?
3 Answers Rushmore Consultancy,
Swap two variables value without using third variable in php ?
Is session a cookie?