PHP: How to strip HTML tag while allowing < and >

Xraider

New Member
Question: How do I strip HTML tags but allow the greater and less-than sign using PHP?If I used PHP's \[code\]strip_tags()\[/code\] function, it doesn't quite work:\[code\]$string = '<p>if A > B</p>'echo strip_tags($string); // if A B// but I want to output "if A > B"\[/code\]UPDATEBasically, I only want to allow/display plain text.
 
Back
Top