I m using sceditor in website if i add some text into and change styles and save into database. it storing with sceditor tags like,
[u][i][b]Hello[/b][/i][/u]
How to remove this tags using php or javascript or jquery.
Just Try with this.
<?php
function stripSquareTags($text) {
$pattern = '|[[\/\!]*?[^\[\]]*?]|si';
$replace = '';
return preg_replace($pattern, $replace, $text);
}
echo stripSquareTags($text);
?>
PHP有它的bbcodes自己的功能- http://php.net/manual/bg/function.bbcode-create.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.