Do you know of a function that can check if a string contains an integer?
Here\'s how I\'d expect it to work:
holds_int(\"23\") // should return true
ctype_digit will do the trick:
ctype_digit
ctype_digit($str)
$str
.