Here is my simple code:
<?php
$components=array(
1 => 'Carrot', 'Apple', 'Orange',
2 => 'Boiled Egg', 'Omelet',
3 => 'Ice Cream', 'Pancake', 'Watermelon'
);
echo'<pre>';
var_dump($components);
echo'</pre>';
output :
array(6) {
[1]=>
string(6) "Carrot"
[2]=>
string(10) "Boiled Egg"
[3]=>
string(9) "Ice Cream"
[4]=>
string(6) "Omelet"
[5]=>
string(7) "Pancake"
[6]=>
string(10) "Watermelon"
}
- Where is
'Apple'
&'Orange'
? - Why I cannot retrieve the a specific value from (for example : $components[1][2] = 'r') :/ Why ?!