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
if(preg_match('/^[1-9]\d*$/',$i)) { //Positive and > 0 }