I have a document in the following form:
[uuid] => d030b8d1
[commentstrings] => Array (
[0] => 1366220389#mac@test.org#test 1
[1] => 1366220422#mac@test.org#test 2
[2] => 1366220458#mac@test.org#test 3
)
I have a full string of one of the commentstrings and want to delete that value.
If I try this on CLI, it works:
db.messages.update(
{'uuid':'d030b8d1'},
{ $pull : {
'commentstrings': '1366220422#mac@test.org#test 2'
}}
)
But if I try the same in PHP nothing happens:
$response = $stdb->messages->update(
array('uuid'=>'d030b8d1'),
array('$pull' => array('commentstrings' => '1366220422#mac@test.org#test 2'))
);
Any idea, what I'm doing wrong here?