I’d like to remove the tag from my HTML.
I have the following HTML:
<h1><a href="http://www.google.com/">Google</a>& Yahoo</h1>
I’d like to use PHP to convert the above to: <h1>& Yahoo</h1>
Can someone explain how I achieve this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this with
strip_tags().The result will be
<h1>Google & Yahoo</h1>. In case you really want the result<h1>& Yahoo</h1>, you can do it in this way: