Jerppu
07-21-2011, 03:44 PM
Hi. How could I get results of following loop to side block on my forum (php/html)
So output 5 times $description :
$limit = 5;
for($x=0;$x<$limit;$x++) {
...random code...
$description = $feed[$x]['desc'];
...random code...
}
Instruction says:
$my_output = 'Hello, world.';
return $my_output;
But if I add "return $description;", I get only one output cause "return" immediately ends execution of the code.
So output 5 times $description :
$limit = 5;
for($x=0;$x<$limit;$x++) {
...random code...
$description = $feed[$x]['desc'];
...random code...
}
Instruction says:
$my_output = 'Hello, world.';
return $my_output;
But if I add "return $description;", I get only one output cause "return" immediately ends execution of the code.