codehaven - php snippets - coding help
Generic filters
Exact matches only
  • Search for multiple words in a string – PHP

    14th February 2020

    Php - Strings

    php codehaven

    If you want to find one word in a string you would use strpos, but there can be a problem when you want to search for more than one word, then this code below would work for you.

    Was this code snippet helpful?