can someone tell me if there is posibility to use one pattern for multiple replacement?I have a pattern, and a replacement array and I seek to replace the matches sequentially from the array. Like
match = > array[0]
match = > array[1]
and so on. Thanks
can someone tell me if there is posibility to use one pattern for multiple
Share
I’d go with a
preg_replacewith callback:Each subsequent match will get the next entry from the replacement array.