21,891
社区成员
发帖
与我相关
我的任务
分享
$str=preg_replace('/\[e(\d+)\/]/','<img src="$1.gif" />',$str);
<?php
function getIMGString($str) {
return preg_replace('/\[e(\d+)\/\]/', '<img src="$1.gif" />', $str);
}
$str = '[e123/]' ;
echo getIMGString($str) ;
?>