Using the array() Function : array « Data Structure « PHP
- PHP
- Data Structure
- array
Using the array() Function
<?php
/* Arrays $foo and $bar are equivalent arrays */
$foo = array('a' => 1, 'b' => 2, 'c' => 3);
$bar['a'] = 1;
$bar['b'] = 2;
$bar['c'] = 3;
?>
Related examples in the same category