Using preg_replace on an array

前端 未结 3 432
孤独总比滥情好
孤独总比滥情好 2021-01-13 07:55

I have a relatively large array of elements which I want to search for a string and replace any matches. I\'m currently trying to do this using preg_replace and

3条回答
  •  隐瞒了意图╮
    2021-01-13 08:43

    your $array contains some further arrays. preg_replace works fine with arrays of strings, but not with arrays of arrays [of arrays...] of strings.

提交回复
热议问题