PHP String Match And If Statement – String Function

 
    <?php
     $string = "numbers 42";
     $pattern = "/[^0-9]$/";if(preg_match($pattern, $string))
          print("Found a match!");
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.