php function to convert decimal to 10s php code example Example: string to decimal php $num = (double) "10.12";