Originally posted by Steveo31
As in you want everything in the PHP file, except the bold tagged words to be deleted??
Hmm, methinks he means strip all tags except the bold.
If that is the case, here's a typical dalecosp kluge:
<?php
$data="This <i>is</i> <img src=foo.jpg> some <b>bold</b> text.";
$data=str_replace("</b>","[woohoounbold]", $data);
$data=str_replace("<b>", "[woohoobold]", $data);
$data=strip_tags($data);
$data=str_replace("[woohoobold]","<b>",$data);
$data=str_replace("[woohoounbold]","</b>",$data);
echo $data;
?>
I'm sure that this will help me ensure my continued title of "kluge liege"; it may be that someone with a brain will come by and give you a better solution, perhaps using something like [man]preg_replace/man...
😃