cast string to int php
snippet in php

php string to int

user913

intval($string);

cast string to int php

user8416

$num = "3.14"; 
$int = (int)$num;//string to int
$float = (float)$num;//string to float