Skip to content
Advertisement

Tag: truncate

How do I truncate a decimal in PHP?

I know of the PHP function floor() but that doesn’t work how I want it to in negative numbers. This is how floor works This is what I WANT Is there a PHP function that will return -1234? I know I could do this but I’m hoping for a single built-in function Answer Yes intval

Advertisement