Fernanditos
asked on
PHP function to clean string from HTML tags except url and strong tag.
Hi,
Does someone knows a php function to clean a php string from all tags except links and bold text?
Please help.
Thank you.
Does someone knows a php function to clean a php string from all tags except links and bold text?
Please help.
Thank you.
ASKER
Trim was not exactly the solution. I found strip_tags do it great.
<?php echo strip_tags($row_rsPage['body_pnas_en'], '<p><a><br><li><strong>'); ?>
htmlentities,htmlspecialchars
You're on firm ground with strip_tags() but please read the warnings on the man page. See also this note:
http://us.php.net/manual/en/function.strip-tags.php#88991
Best regards, ~Ray
http://us.php.net/manual/en/function.strip-tags.php#88991
Best regards, ~Ray
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://php.net/manual/en/function.trim.php