get this from my database:
252.587254564
Well i wanna remove the .587254564 and keep the 252, how can i do that?
.587254564
252
you can use echo (int) 252.587254564;
echo (int) 252.587254564;
In MySQL you can use:
select floor(field)
or in PHP you can use:
floor($value);
You can do it in PHP:
round($val, 0);
or in your MYSQL statement:
select round(foo_value, 0) value from foo
You can just cast it to an int:
int
$new = (int)$old;