If they are strings, you may wish to check for this for validation purposes before processing.
The (int) type casting will work fine on it's own but bear in mind that strings will be forced to integers whatever the string. So:-
$a = 'some ball of string';
$b = (int) $a;
echo $b;
This would output 0 (zero). If this could cause a problem in your script, test the user input first to check it is valid. You could do this with is_numeric(), is_int(), etc.