This question already has an answer here:
- strip_tags() … replace tags by space rather than deleting them 10 answers
I have used strip_tags to remove html tags from the text.
Example
<h1>title of article</h1><div class="body">The content goes here......</div>
outputs
title of articleThe content goes here......
If you see the output title and body are joined(articleThe). I want to insert a space if the tag has been removed. Is this possible.
I appreciate any help.
Thanks.