canadabeeau Posted February 23, 2010 Share Posted February 23, 2010 Hey guys, I have this PGP code $dec = hexdec($hex); now it is converting to decimal but as scientific, ie 6.44301743422E+18 I need it to be pure decimal, any ideas on how to fix this or is there another PHP function I can use? Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/193050-convert/ Share on other sites More sharing options...
canadabeeau Posted February 23, 2010 Author Share Posted February 23, 2010 The point is I am converting a ASCII to HEX, then the HEX to DECIMAL and finally the DECIMAL to BINARY and it (obviously is important that it does not go to scientific Again any help appreciated Quote Link to comment https://forums.phpfreaks.com/topic/193050-convert/#findComment-1016702 Share on other sites More sharing options...
canadabeeau Posted February 23, 2010 Author Share Posted February 23, 2010 EDIT: Sorry I was wrong, the one step method was so off and inaccurate so the problem still exists of converting HEX to DECIMAL without it being scientific notation :-D Quote Link to comment https://forums.phpfreaks.com/topic/193050-convert/#findComment-1016703 Share on other sites More sharing options...
salathe Posted February 23, 2010 Share Posted February 23, 2010 Is there any reason you're converting to hex to decimal to binary and not just going straight to binary? Quote Link to comment https://forums.phpfreaks.com/topic/193050-convert/#findComment-1016719 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.