This is simple php example of a for-each loop, useful for iterating over lists and objects arrays.
<?
// foreach example - loop through each entry in an array
$metals = array("copper","iron","gold","cobalt");
foreach ( $metals as $element ) {
echo "This element is: $element<BR>";
}
?>
// foreach example - loop through each entry in an array
$metals = array("copper","iron","gold","cobalt");
foreach ( $metals as $element ) {
echo "This element is: $element<BR>";
}
?>
Another posts included in "PHP"
| Posting to a Wordpress Blog Via XMLRPC Using Blogger API (1) | 2007/12/15 |
| How to post blog content by metaweblog API ? (3) | 2008/01/02 |
| How to upload attachments such as image by metaWeblog API ? (0) | 2008/01/07 |
| Can PHP switch in strings ? (0) | 2007/10/16 |
| PHP Switch Example (0) | 2007/10/16 |
| How to send email in PHP ? (0) | 2007/10/16 |
| How to pass variables via url (0) | 2007/10/16 |
| How to declare array in PHP like C/C++ (0) | 2007/10/16 |
Trackback : Cannot send a trackbact to this post.
-
Subject Rape sex.
2009/03/09 00:59
Rape porn. Rape pictures.
-
Subject Viagra online.
2009/03/26 14:47
Viagra.
-
Subject Viagra for order lamisil viagra.
2009/03/29 02:04
Viagra message board. Taking viagra with cialis. Buy viagra uk. Discount viagra. Herbal viagra.
-
Subject different money making ideas
2010/01/29 00:11
moneyideas
-
Subject different money making ideas
2010/01/29 08:46
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed