<?php 
$str = "fdsfdsfsd你好[code]老大哥fdsfsd4353[/code]fdsfsdr3";
$array=split("\[code\]|\[/code\]",$str);
print_r($array);
?>