Converting 5e-08 to decimal in PHP

0 votes

I am trying to convert 5e-08 into a proper decimal point, how can i accomplish this with PHP

<?php

$value = 5;

$real_btc = $value/1e8;

echo $real_btc;

This returns

5.0E-8

I need it to return the proper decimal value of 0.00000005

How can i do this with PHP?

Sep 12, 2018 in Blockchain by slayer
• 29,050 points
103 views

1 answer to this question.

0 votes

Use printf with the appropriate format specifier:

printf("%.8f", 5 / 1e8);
answered Sep 12, 2018 by digger
• 27,630 points

Related Questions In Blockchain

0 votes
1 answer

How to get amount of bitcoins in php?

I’ve tried this code and it works: <?php function ...READ MORE

answered Aug 24, 2018 in Blockchain by slayer
• 29,050 points
44 views
0 votes
1 answer

How to create Bitcoin Address in PHP?

You need to understand that Bitcoin address and ...READ MORE

answered Aug 27, 2018 in Blockchain by Perry
• 17,010 points
394 views
0 votes
1 answer

How to round a number down to 8 decimal places if its over 8 decimal places in Javascript

Try it in this way: function nrOfDecimals(number) { ...READ MORE

answered Sep 12, 2018 in Blockchain by slayer
• 29,050 points
31 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 84 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
63 views
0 votes
2 answers

PHP: json_decode - reading category names

<?php function findHighestBid() { $result = ...READ MORE

answered Sep 7, 2018 in Blockchain by Shotgun
44 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
126 views
0 votes
1 answer

How to use bitcoin price as place holder in php?

You can do it by providing an ...READ MORE

answered Aug 21, 2018 in Blockchain by digger
• 27,630 points
34 views
0 votes
2 answers

how to integrate coinbase api in php for transfer bitcoine

Here the code for php please have ...READ MORE

answered Sep 17, 2018 in Blockchain by Suresh
191 views