If it's numerical data, then it should be stored as such. Just because you want to display it as something else has little bearing on the matter.
To that end, it sounds like what the OP wants could be accomplished with something like:
$formatted_number = rtrim((string)$number), '0.');
(which, of course, also has an equivalent SQL expression).