Combination of the strpos
and strrev
functions will do the trick:
$str = "1.1234567"; echo (int) strpos(strrev($str), ".");
Combination of the strpos
and strrev
functions will do the trick:
$str = "1.1234567"; echo (int) strpos(strrev($str), ".");