![]() |
Number format
Can anyone please tell me an easier way to do this? I want to have the thread views in a number format (with an apostrophe after 1000). Here is the code I got it to work with but there must be a better and easier way to accomplish this.
PHP Code:
PHP Code:
|
The problem is that number_format(...) changes the resulting variable to a string. If you look back at that code, the variable you are converting ($userthreadviews) is used in an if(...) statement in the next line.
Try the following code: PHP Code:
|
Thanks for clearing that up for me. :) The code I had above worked, but I had to put two lines in it to make it work. I didn't realize I could move it down to just before I evaluated the template. Thanks again. This will definitely help in the future as well. :)
|
All times are GMT. The time now is 02:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|