i have this array:
[Jessica CS] => Array
(
[2011-04-20] => Array
(
[0] => 69.90
[cancel] => 1311145200
[1] => 29.95
[2] => 69.90
)
)
[Rex CS] => Array
(
[2011-04-20] => Array
(
[0] => 119.94
[cancel] =>
)
[2011-04-26] => Array
(
[0] => 199.50
[cancel] =>
[1] => 29.95
)
....
and i am adding together these values by using a loop:
$i=0;
foreach($dates as $d){
$total[$i] += array_sum($value[$d]);
#i++;
}
this will add everything together and what i want is to exclude the [cancel] field from being added to the array_sum
edit: i could probably add the values that are int, but not sure how to sort them
any ideas?
thanks
Personally I would change the layout of the array so that it went more like:
Replacing [costs] with whatever name is most relevant.
Working with your existing array
Failing that