how to get rid of decimals in php code example Example: remove decimal php $var = 252.587254564; $var = (int)$var; // 252