Jump to content

Associative array/Creation: Difference between revisions

(added php example)
Line 103:
echo($array['foo']); // bar
echo($array['moo']); // Undefined index
 
//alternative (inline) way
$array2 = array('fruit'=>'apple, 'price'=>12.96, 'colour'=>'green');
 
 
===Iterate over key/value===
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.