write a program to print
[123]
[456]
[789]
note : braces also need to be printed
Answers were Sorted based on User's Feedback
Answer / digambar kangude
$k=1;
for($i=1; $i<=3; $i++)
{
echo "[";
for($j=1;$j<=3;$j++)
{
echo $k;
$k++;
}
echo "]";
}
| Is This Answer Correct ? | 14 Yes | 3 No |
Answer / sumit manchanda
<?php
$count=0;
echo "[";
for($i=1;$i<10;$i++){
if($i%3==0){
echo "$i";
echo "]";
echo "</br>";
$count++;
}else{
if($count==3){
echo "[";
$count=0;
}
$count=$count+1;
echo "$i";
}
}
?>
| Is This Answer Correct ? | 11 Yes | 1 No |
What are the features of php 7?
What does nan stand for computer science?
What is design pattern? Explain all including singleton pattern?
What is the capacity of mysql database?
What is the meaning of xdebug?
List out some tools through which we can draw E-R diagrams for mysql.
for image work which library?
What’s the special meaning of __sleep and __wakeup?
Why session is required?
What is the difference between runtime exception and compile time exception?
How to avoid the undefined index error?
What is crypt () in php?