Home Forums PHP Replace array of words with str_replace


Viewing 1 post (of 1 total)
  • Author
  • #674
    Usman Haider

    str_replace is widely used for replacing a word or a single character in PHP. But if you want to replace multiple words at a time, then you can place them in an array and replace them using str_replace function. Here is the usage:

    Replace Multiple Words with a Single Word with str_replace:


     Replacing array of words with array of words in PHP (str_replace:

    Hope it helps ­čÖé

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.