PHP Simple Use Of Preg_Match() – String Function

 
    <?php
     $string = "PHP is the web scripting language";
     $pattern = "/PHP/";if(preg_match($pattern, $string))
          print("Found a match!");
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.