0

I have php 3.2.1 and want to decode html tags for example < or > I know of html_entity_decode in php 4 and above but not sure what do you for PHP 3?

3
  • 6
    Whoa, a fossil! Commented Oct 21, 2011 at 12:32
  • Perhaps you might think of updating your PHP version... Commented Oct 21, 2011 at 12:32
  • PHP_Compat or upgradephp or look into the manuals comment section. Commented Oct 21, 2011 at 12:34

2 Answers 2

3

The preferred solution would be to upgrade PHP so that it doesn't make your hair stand on end when you hear what version it is...

Other than that, you 'd have to implement your own given a list of HTML entities, a loop and str_replace. Even then you 'd have another possible problem: encodings (PHP 3 doesn't offer any encoding conversion support, so you 'd have to code that too if you need it).

Sign up to request clarification or add additional context in comments.

Comments

1

If you're still on php 3.2.1, a version that is about 10 years old and no longer supported, you are doing something fundamentally wrong. Running an application on such an old, unsupported piece of infrastructure is a huge risk!

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.