A simple use of preg_match() : String Matches : String PHP Source Code


PHP Source Code » String » String Matches »

 

A simple use of preg_match()



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

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo String
» String Matches