preg_match_all or substr?
-
I want to write a plugin that replaces occurrences of special code like [myCont=qwerty]
So, I want the plugin to look for ‘[myCont=’ and look for the matching end ‘]’ and then do something with the bits in the middle
I’ve looked up other functions and am unsure the best approach
I’ve seen preg_match_all used as well as substr
I wanted to know which method was better?
Are there any other functions that do text replacement that I might want to consider in PHP?Thanks
Omar
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘preg_match_all or substr?’ is closed to new replies.