开发者

php, get some code from text

how from this text get WORD开发者_如何学C and WORD2.

text tex asad t text [mycode]WORD[/mycode] tex asda [mycode]WORD2[/mycode] asdasdasd

I try using preg-match, but i fail


$str = "text tex asad t text [mycode]WORD[/mycode] tex asda [mycode]WORD2[/mycode] asdasdasd";
preg_match_all("/\[mycode\](.*?)\[\/mycode\]/", $str, $preg);
print_r($preg);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜