title: Php search string (with wildcards)
body: <p>Is there a way to put a wildcard in a string? The reason why I am asking is because currently I have a function to search for a substring between two substrings (i.e grab the contents between "my" and "has fleas" in the sentence "my dog has fleas", resulting in "dog").</p>
  
  <pre><code>function get_string_between($string, $start, $end){ 
      $string = " ".$string; 
      $ini = strpos($string,$start); 
      if ($ini == 0) return ""; 
      $ini += strlen($start); 
      $len = strpos($string,$end,$ini) - $ini; 
      return substr($string,$ini,$len); 
  } 
  </code></pre>
  
  <p>What I want to do is have it search with a wildcard in the string. So say I search between "%WILDCARD%" and "has fleas" in the sentence "My dog has fleas" - it would still output "dog". </p>
  
  <p>I don't know if I explained it too well but hopefully someone will understand me :P. Thank you very much for reading!</p>