Baseball Posted December 23, 2009 Share Posted December 23, 2009 Iuno how to explain but i can show u visually.. if it's anything below 10 it should equal 1. anything between 10 and 19 should equal 2. anything between 20 29 should equal 3.. any so on.. If u may ask why i need this? it's cause im creating custom forum software, and im on the part were u add a reply and it goes to the last page if needed. lloll long story short. Quote Link to comment https://forums.phpfreaks.com/topic/186151-i-need-to-round-my-variable/ Share on other sites More sharing options...
laffin Posted December 23, 2009 Share Posted December 23, 2009 sounds like a pagination system http://www.phpfreaks.com/tutorial/basic-pagination a tutorial here Quote Link to comment https://forums.phpfreaks.com/topic/186151-i-need-to-round-my-variable/#findComment-983066 Share on other sites More sharing options...
Baseball Posted December 23, 2009 Author Share Posted December 23, 2009 sounds like a pagination system http://www.phpfreaks.com/tutorial/basic-pagination a tutorial here no i alrdy know that, lol im just saying i echo out a variable let's say 38. i need that to be SET TO 3. IF the variable is 200 i need it to be set to 20 just basic rounding but iuno how. Quote Link to comment https://forums.phpfreaks.com/topic/186151-i-need-to-round-my-variable/#findComment-983067 Share on other sites More sharing options...
Baseball Posted December 23, 2009 Author Share Posted December 23, 2009 $page = floor( ($num_rows['0'] + 10) / 10); $page = $page; nvm i found it Quote Link to comment https://forums.phpfreaks.com/topic/186151-i-need-to-round-my-variable/#findComment-983070 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.