title: How to find the position of a pattern in a string using PHP?
body: <p>I'm a newbie to php. is there any function that can match a pattern in a given string and and return the index of the beginning of the pattern within that string?
  eg: if <code>$pattern = '/abcd/'</code>, <code>$string = 'weruhfabcdwuir'</code> then the function should return 6 since 6 is starting index of <code>'abcd'</code> in <code>$string</code></p>