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,310 points
1,984 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
• 26,720 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,310 points
417 views
0 votes
1 answer

How to create Bitcoin Address in PHP?

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

answered Aug 28, 2018 in Blockchain by Perry
• 17,100 points
3,859 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,310 points
651 views
0 votes
1 answer

bitcoin to currency converter and it's reverse in php

Ok, you can get the value by ...READ MORE

answered Mar 31 in Blockchain by Rahul
• 9,000 points
80 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 aryya
• 7,440 points
650 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
572 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
1,009 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
• 26,720 points
265 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
2,195 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP