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