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,370 points
3,261 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,740 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,370 points
1,019 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
5,443 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,370 points
1,509 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, 2022 in Blockchain by Rahul
• 9,680 points
755 views
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,417 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
1,232 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,916 views
0 votes
2 answers

Does Ethereum Solidity support Associative Arrays?

Here's a little example that passes values ...READ MORE

answered Sep 17, 2018 in Blockchain by Bobin
1,100 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,740 points
913 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
3,130 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP