how to remove the numbers and keep the rest after the dot

php

Solution

$input = $input - intval($input);

For negative numbers, the above code will get a negative decimal component (which may be desired in some cases). If you always want the positive decimal component, just take the absolute value of `$input`.

Problem

Sorry I couldn't explain clearly in the title. I Studied math in other language I don't know what it calls. I have these values. ``` $input = 13.2156; $input = 45.232; $input = 1193.215624; ``` I want a function in PHP to get what what after the dot, which is this case ``` $input = 13.2156; // 0.2156 $input = 45.232; // 0.232 $input = 1193.215624; // 0.215624 ``` I know `intval()` do the opposite. BUT I want the opposite of the opposite. :D

Original source