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 |
Explain include(), include_once, require() and require_once?
What will the ?getdate() function returns in PHP?
A process is identified by a unique___
how much can a 1yr experienced php programmer earn in india?
9 Answers TCS, Tops Technologies,
What are the difference between array_keys() and array_key_exists() in php?
Where sessions stored in PHP?
Do you know what is the differences between $a != $B and $a !== $B?
Is multilevel inheritance possible in php?
Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()
This is regarding file uploading. 1. Who will be the owner of the uploaded file ? 2. What permission you will give for an uploaded file ? 3. What is mean by user, group and others and what kind of permission you will give for each user and explain the reason?
How to count a number of words in a string in php?
How to check a variable is an array or not in php?