how to add 1 to a sring in php code example Example: add two numbers as string in php $num = "3.14"; $int = (int)$num; $float = (float)$num;