Since I'm a beginner in PHP
I can't figure it out how I should make my calculator display the zeros instead of -x at the end?
<?php
$intValue = 0;
$arrResult = json_decode(file_get_contents('http://preev.com/pulse/units:btc+usd/sources:bitfinex+bitstamp+btce'), true);
foreach($arrResult['btc']['usd'] as $key => $index){
$intValue = $intValue + $arrResult['btc']['usd'][$key]['last'];
}
echo ($intValue / 3);
$val1 = 1;
$value001usd = $val1 / $intValue / 3 / 1000;
echo " 0.001 USD Equals to $value001usd BTC";
?>
It outputs the result at the time of this post as: 402.31333333333 0.001 USD Equals to 2.7618053369126E-7 BTC
Now I need it to be " 402.31333333333 0.001 USD Equals to 0.000002761 BTC"