René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Arrays in PHP | ||
A php page containing this code....
<html><head><title>Array example with PHP</title></head> <body> <?php // Initialize an array ($a) with // three elements: $a = array('one', 'two', 'three'); // Append 'four' to the array: $a[] = 'four'; // Same thing, but with array_push: array_push($a, 'five'); // Iterating over the array's elements: foreach ($a as $ix => $val) { print "<br>$ix: $val"; } ?> <p><a href='http://www.adp-gmbh.ch/php/array.html'>Go here</a> </body> </html>
... can be found here.
|