Reap38 Posted August 25, 2016 Share Posted August 25, 2016 (edited) O have a value of coin base system and the user may have 73020 coins now the data base reads out the 73020 coins no problem but the php is not reading the last 0 because its a null or empty or something and its just not liking the 0 at the end of the stringso lets say $mycoins = $row['mycoins'];and this echos out 73020what this 73020 is really saying is thisonce its all converted out correctly$73.02%0So what I thought I needed to do was count the string first to get all the numbers and place if count == 5 I could do the row statement for the ten dollar section or if count == 6 i could so that row for the hundreds and so on.but i can not solve the 0 issue so lets write a simple code <code> $mycoins = '73020';$count_mycoins_string = strlen($mycoins);echo $count_mycoins_string;I would think the result would be 5but it counts 4 because the last number of the string is 0 how can i fix that?</code> Edited August 25, 2016 by Reap38 Quote Link to comment Share on other sites More sharing options...
Solution Reap38 Posted August 25, 2016 Author Solution Share Posted August 25, 2016 never mind i solved it Quote Link to comment Share on other sites More sharing options...
requinix Posted August 25, 2016 Share Posted August 25, 2016 It would be nice if you could share what you discovered, since I know that there's something else going on besides PHP "not liking" that zero... Quote Link to comment 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.