Guys,currently I'm using this:
$meta = htmlspecialchars($m);
This one is stripping all the HTML chars..But i want to just remove "<" and ">"
How do i do it ?
Thanks
To remove all <
and >
characters from a string, use
$meta = str_replace(array('<','>'), '', $m);
Use str_replace()
This will replace the <
and >
characters with '' (nothing).
$cleantext = str_replace(array('<', '>'), '', $text);
Or replace them with encoded characters.
$cleantext = str_replace(array('<', '>'), array('<', '>'), $text);