echo array_sum($filedata);
I think that should do the trick.
Take a look here for further information. array_sum just sums up all the values in an array.
EDIT
The above example would work if your array was a flat array of integers, decimals etc. The following is how you would sum up a 2 dimensional array where the value you want to sum is at index position 5:
var $sum = 0;
foreach($filedata as $dataElement) {
$sum += $dataElement[5];
}
echo $sum;
The above code assume that $filedata is an array of array's, each array in filedata has a value at index 5 that can be summed up... Is that more along the lines of what you need?
var_dump($filedata[5])? Note that neitherfopennorexplodeautomatically adds numbers.explode()always returns an array of strings, so it's definitely a string...