i've searched thoroughly on both here and the manual but without any success.
so I have a voting system for cars... now I don't want people to see long decimals (remainders).
How can I remove the decimal?
someone mentioned using the % module somewhere, but I didn't quite understand how that would work.
I've thought about using ereg_replace() or preg_replace() or str_replace()
so maybe I could use this...
str_replace(".+[^[:digit:]]", "", $string);
after some more research
//i'd be more like this
str_replace("\.(.)[[:digit:]]", "", $string);
//still no luck though
or something like that..? i'm not sure if the [[digit]] would be parsed correctly, but i'm gonna give that one a shot real quick.
any help is greatly appreciated 🙂