I have a website which parses RSS feed from websites and posts them on a page.
The script that runs behind my website, which reads and reformats the RSS feed, is currently stripping all the HTML tags.
Here's the code;
$description = strip_tags($description);
I want to allow tags like <p>, <a> or <br /> to make it look nice. How to do it?
Solution:
You can use:
<?php
strip_tags($source, array('<p>', '<a>', '<br>'));
?>
1 year 22 weeks ago