We have 11 guests online
   
PHP Scripts arrow Free PHP Tutorials arrow Free PHP Tutorials arrow PHP Tutorials and Examples arrow PHP 
Free PHP Tutorials arrow PHP Tutorials and Examples arrow PHP

Cycling through an array of names with foreach
User Rating: / 0
PoorBest 

Using the foreach construct to cycle through an array.

  1. <?php
  2.     $namesList = array("aaron", "wally", "steve", "jeff", "andrew", "joivan");
  3.    
  4.     foreach($namesList as $name) {
  5.         echo $name . "<br />";
  6.     }
  7. ?>

 

 

Directory Stats

There are 702 listing and 43 categories in our website

Change Language

British Article Directory
Online Mall
Car Insurance
Remortgages
Loans