Do you want to generate a lot of numbers in a range with a php loop? Or, you may want to generate a dynamic menu from a php array or something and dont know how to get out the values from this array.
Here is for the numbers, it can be done in two ways, using range function (only php 5) or manually estabilish them.
<?php for($i < 0; $i < 10; $i++) { print $i; } //or using range $nrs = range(0,10); foreach($nrs as $nr) { print $nr; } //Here is to extract from array $values = array("banana", "something", "apple"); foreach($values as $products) { print $products; } ?>
Hi,
Great job. But not enought info. Where can i read more?
Thanks
SonyaSunny
On the php official website!
Come on guys theres hardly and comments on this article!
O.K, you got me this is like my 3rd comment here today I cant wait for your next article!
I like that you update your blog quite a bit it keeps me coming back all the time.