![]() |
|
[PHP] Convert big number to small number - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] Convert big number to small number (/showthread.php?tid=5792952) |
Convert big number to small number - deadsh0t - Jan 31, 2018 So i have 150862738402486 which is actually 1508.62738402486 coins so i want to let it convert so it is correct if i want to send 1508.62738402486 coins i need to input 150862738402486 so the user needs to input that as well so i searched for few hours now but cant find a solution so i am looking for a function that can convert 1508 (wich is a normal user submit) to 150800000000000 for the input to the json rpc server and vice versa because i am showing the balance on the user page RE: Convert big number to small number - Seifer - Jan 31, 2018 Either I am not understanding the question correctly or you can just multiply the input of the user by 100000000000 then divide to show the balance? RE: Convert big number to small number - RumbleFrog - Jan 31, 2018 Uhm, you just multiply by 100000000000? RE: Convert big number to small number - deadsh0t - Jan 31, 2018 (Jan 31, 2018 05:44 AM)RumbleFrog Wrote: Uhm, you just multiply by 100000000000? Lol i was thinking to hard yes i can just do that lmao i always think to difficult about these things |