Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

Cycling through an array of names with foreach

Code Wizard, 12-30-2006

Using the foreach construct to cycle through an array.

<?php
$namesList = array("aaron", "wally", "steve", "jeff", "andrew", "joivan");

foreach($namesList as $name) {
echo $name . "<br />";
}
?>
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions