- convert a string of numbers to a sentence in php code

PHP
s = "123";
echo intval(s); // 123

s = "hello";
echo intval(s);	//0$num = "3.14"; 
$int = (int)$num;//string to int
$float = (float)$num;//string to float
Source

Also in PHP: