I need to check for a form input value to be a positive integer (not just an integer), and I noticed another snippet using the code below:
$i = $user_input_v
In addition to all the other answers: You are probably looking for ctype_digit. It looks for a string containing only digits.