My Array:
<?php
$fruitcolors = array('apple'=>'red', 'lemon'=>'yellow');
?>
I need to know how to echo the value of apple, so it echos "red".
Also I need to know how to add a new value with php code:
$fruitcolors[] = "Pear" => "Green"; etc.
On
Basic feature of arrays are clearly explained in the manual:
echo $fruitcolors['apple'];
$fruitcolors['pear'] = 'green';
See http://php.net/array for more info.