This code
$real = array (1, 2, 3, 4, 9 ) ;
$timePeriod = 5;
$data = trader_sma($real,$timePeriod);
$ta_sma = $data[4];
echo $ta_sma;
Gives nice result of "3.8"
But this one
$real = array (0.00035606, 0.00035571, 0.00035607, 0.00035606, 5.00035607);
$timePeriod = 5;
$data = trader_sma($real,$timePeriod);
$ta_sma = $data[4];
echo $ta_sma;
is giving "1" (no decimal numbers)
I tried all possible number_format combinations and could not get normal result in 2nd code
How to format this to get real number which is 1,000355994?