Q. Which PHP function checks if a string contains only digits?
β
Correct Answer: (B)
ctype_digit()
Explanation: ctype_digit() checks for digits only (0–9).