user
Create a PHP script to detect whether a string contains a number.


assistant
<?php
function containsNumber($string) {
    if (preg_match('/\\d/', $string)) {
        return true;
    }
    return false;
}
?>