PHP String to int
intval($string);
Concerned Chipmunk
intval($string);
<?php
$string = "56";
$int = intval( $string );
echo $int;
?>
$num = "3.14";
$int = (int)$num;//string to int
$float = (float)$num;//string to float
$num = "3.14";
$int = (int)$num;
$str = "10";
$num = (int)$str;