note 57572 deleted from control-structures.foreach by felipe
| From: | felipe@php.net | Date: | Sun, 09 Dec 2007 16:03:41 +0000 |
| Subject: | note 57572 deleted from control-structures.foreach by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133044@lists.php.net to get a copy of this message | ||
Note Submitter: Flavio Tubino From Blumenau, Brazil
----
Like the FOR statement, you can also write:
<?php
$a_array=array("a","b","c");
foreach($a_array as $key=>$value):
print $key." = ".$value."<br>";
endforeach;
?>