Jump to content

Finding Equivalents


Nick G

Recommended Posts

Hey, I just got a quick problem here.

 

The quick version:

I want to put a point/experience program on my site.  Every 10 points (or so) your level goes up one.

 

What would be the best way to do this?  Is there a way to check and see if the points are an equivalent of 10?  Cause that would be the ideal option.

 

Thanks for any help!

Link to comment
https://forums.phpfreaks.com/topic/96270-finding-equivalents/
Share on other sites

Nevermind, I figured it out.  For anyone interested, here's how.

 

On the user profile (or wherever the level is seen) just put:

 

$userLevel = number_format ($userPoints / 10);

 

Divide the userPoints (by whatever number you want) then just use number format to not show decimals

Link to comment
https://forums.phpfreaks.com/topic/96270-finding-equivalents/#findComment-492808
Share on other sites

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.