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 differentiate isset and empty
6 Answers A1 Technology, Dass Infotech, Microface,
What are the different ways we can retrive the mysql results using php ? Explain each
Is php faster than nodejs?
How to access standard error stream in PHP?
What is the difference between md5(), crc32() and sha1() crypto on php?
How can I load data from a text file into a table?
What exactly is PHP?
how can i get USA time using php...
write function of the sentence traversal passing the parameter, e.g input:this is input sentence. output:sentence input is this.
What Is a Persistent Cookie?
Which function Returns the time of sunrise for a given day / location in PHP.
What are the differences between GET and POST methods in form submitting?