If I have:
$my_array = array(
"user1" => "100",
"user2" => "200",
"user3" => "300"
);
How can I use array_sum to calculate the sum of the values except the one of the user3?
I tried this function (array_filter), but it did not work:
function filterArray($value) {
return ($value <> "user3");
}
I'm using PHP Version 5.2.17