7

A web service that I am accessing send the following response...

<strong>result</strong>

How can I strip the string of these encoded tags?

3
  • 2
    maybe convert to HTML and then strip_tags? Commented Nov 11, 2011 at 3:24
  • 1
    stackoverflow.com/questions/657643/… Commented Nov 11, 2011 at 3:26
  • I tried using htmlspecialchars and html_entity_decode in conjunction. I missed the strip_tags Commented Nov 11, 2011 at 3:34

1 Answer 1

15
<?php
$str = '&lt;strong&gt;result&lt;/strong&gt;';
echo strip_tags(html_entity_decode($str));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.