Hi,
I got confused on why this is not working.
I have an array of locations stored in $location variable which is
fetched using fetchPairs(). I wanted to add and element "Any" => "Any"
at the beginning of this $location.
so my $locations is [from Zend_Degug::Dump($locations)]:
=================
array(3) {
["location1"] => string(9) "location1"
["location2"] => string(9) "location2"
["location3"] => string(9) "location3"
}
=================
I used:
=======
array_splice($locations, 0, 0, array("Any" => "Any"));
Expecting:
========
array(4) {
["Any"] => string(3) "Any"
["location1"] => string(9) "location1"
["location2"] => string(9) "location2"
["location3"] => string(9) "location3"
}
========
But I am getting:
========
array(4) {
[0] => string(3) "Any"
["location1"] => string(9) "location1"
["location2"] => string(9) "location2"
["location3"] => string(9) "location3"
}
========
Why?
Thanks
--
=======================
Registered Linux User #460714
Currently Using Fedora 8, 10
=======================