In PHP, how to find the second (or third, or fourth, or Nth) occurrence of a pattern in a string?
PHP includes two great functions to find the first or last occurrence of a given pattern in a string: strpos and strrpos. However these functions are limited to just the first occurrence; what should I do if I need to know the position beyond the first occurrence? (such as second occurrence?)