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 |
Where can I find php ini file?
List some features of php that are deprecated in php
Which function(s) in PHP computes the difference of arrays?
What is difference between html and php?
How would you declare a function that receives one parameter name hello?
How to read and display a HTML source from the website url?
we have two tables first one is EMPLOYEE having EmpID, EmpNAME, Second table is SALARY table having id, salary Write a query to get name of those person who having more than 10000$ salary
can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????
•How do you create subdomains using PHP?
Single choice objective PHP question...
Does php have multiple inheritance?
Is it possible to submit a form with a dedicated button?