去掉所有的HTML标签:
$text=preg_replace('/<[^>]+>/','',$text);
去掉<img>标签:
$text=preg_replace('/<img[^>]+>/i','',$text);
//正则表达式去除所有空格和html标签(包括换行 空格 )
preg_replace("/(s| | |xc2xa0)/", "", strip_tags($str));
去掉所有的HTML标签:
$text=preg_replace('/<[^>]+>/','',$text);
去掉<img>标签:
$text=preg_replace('/<img[^>]+>/i','',$text);
//正则表达式去除所有空格和html标签(包括换行 空格 )
preg_replace("/(s| | |xc2xa0)/", "", strip_tags($str));