I'm trying to insert a record that contains a nested array of geospatial data. I've even tried making the array an object instead, but no luck there either. Here's more or less the insert line:
$collection->insert($obj, array('safe'=>true));
One interesting thing is that when I call the index 'loc' something else, such as just an integer, the insert works.
Here's the array that should be going into Mongodb, but isn't:
Array
(
[name] => Home
[address] => 500 Pole Line Road
[city] => Davis
[state] => CA
[zip] => 95618
[loc] => Array
(
[lon] => -121.726710
[lat] => 38.549576
)
)