php define string to decimal 0,1 to. 0.1 code example Example: string to decimal php $num = (double) "10.12";