convert to int php
snippet in php

php string to int

user427

intval($string);

cast string to int php

user721

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

convert to int php

user159

$myintvariable = intval($myvariable);

convert string to int php

user8775

intval ( mixed $var [, int $base = 10 ] ) : int