I'm using the following function:
function do_math($a, $b, $delta_x) {
$sum = 0;
$n_counter = 0;
do {
$sum+=(do_function($a)*$delta_x);
$a+=$delta_x;
$n_counter++;
$sum_store[$n_counter] = $sum;
} while($a<$b);
return($sum);
}
My problem is that I'm not able to reference the variable sum_store from outside the function, it won't print. Does the variable or function need to be globalized somehow for this to work?
thanks in advance,
Cheers!