Is the front-end output of a section such as/:8-) code,
Then in the front of the character to turn into the corresponding QQ expression, ask the great God know how to achieve it?
Reply content:
Is the front-end output of a section such as/:8-) code,
Then in the front of the character to turn into the corresponding QQ expression, ask the great God know how to achieve it?
Since it is the code to the expression , then there will definitely be a code and emoticons (image address) Map it!
$array = array( '/:8-' => '', '/:9-' => '', '/:10-' => '',);$comment = '你好啊 /:8-,你在哪里呢/:10-?';echo strtr($comment, $array);
Results:
你好啊 ,你在哪里呢 ?
Replace the regular or string substitution with the IMG image address ...
function Replace_em (str) {
str = str.replace(/\/g,'>');str = str.replace(/\n/g,'
');str = str.replace(/\[em_([0-9]*)\]/g,'');str = str.replace(/\[img_([\d\D]*)\]/g,'');return str;
}