I\'ve been searching a lot but i cannot find anything similar to my problem. I\'ve found this link but i don\'t think they really answered the question.
Let say i ha
You can simply use preg_match_all function of the PHP along with following regex
preg_match_all
~\[id\](.*?)\[\/id\]~
like as
$my_string = "I am with a [id]123[/id] and [id]456[/id]"; preg_match_all("~\[id\](.*?)\[\/id\]~",$my_string,$m); print_r($m[1]);