Forum Moderators: coopster
$some_array = array(
0 => 'Hello',
1 => ' ',
2 => 'world'
);
$some_array = array(
'first' => 'Hello',
'second' => ' ',
'third' => 'world'
);
echo $some_array['first']; // Outputs Hello
$some_array = array(
'first' => 'Hello',
'second' => ' ',
'third' => 'world'
);
echo $some_array['first']; // Outputs Hello
$things = array();
$things['define_your_own_keys'] = "My value";
$things['another_name'] = "Another value";
$things['refer_to_this'] = "Something here";
echo print_r($things);//will print the contents of the array
echo $things['refer_to_this'];//outputs "Something here"