I am making a project posting system that will have somewhat some markup, similar to bbcodes, When i’m fetching the data from the database I use
strip_tags($content,'<br />');
To remove any unwanted html tags, then I continue on to use
str_ireplace($markup,$html_t,$strip_tags);
And those are both placed in variables for easier working.
I want to allow the <br /> tag because that is what is in my database to achieve line downs (nl2br) now for some reason it’s not echoing out <br />‘s.
No whitespace in second param.
http://php.net/manual/en/function.strip-tags.php