Source Code:
(back to article)
<?php $str = "<h1>Hello World</h1><p>This is a paragraph.</p><a href='https://www.example.com'>Example link</a>"; $result = strip_tags($str, "<a>"); echo $result;
Result:
Report an issue