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 do you set the browser timeout?
Tell me what is needed to be able to use image function?
What is session in PHP. How to remove data from a session?
what is PHP accelerator ?
What are the difference between array_keys() and array_key_exists() in php?
How big is nvarchar max?
What is the difference between super () and this ()?
What are the advantages of oops in php?
What are the Merits and De-Merits of CURL library ?
Is server side a session?
Which php framework is fastest?
Is salary fixed or variable cost?