How can PHP beginners efficiently verify if a user-provided ICQ number contains only numbers and no letters?

To verify if a user-provided ICQ number contains only numbers and no letters, you can use a regular expression to check if the input consists of only numeric characters. This can be achieved by using the `preg_match()` function in PHP with the appropriate regular expression pattern.

$icqNumber = "123456789"; // User-provided ICQ number

if (preg_match('/^\d+$/', $icqNumber)) {
    echo "ICQ number contains only numbers.";
} else {
    echo "ICQ number contains letters or special characters.";
}