Jump to content

I need to round my variable


Baseball

Recommended Posts

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.

 

Link to comment
https://forums.phpfreaks.com/topic/186151-i-need-to-round-my-variable/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.