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?
-
6Whoa, a fossil!Your Common Sense– Your Common Sense2011-10-21 12:32:42 +00:00Commented Oct 21, 2011 at 12:32
-
Perhaps you might think of updating your PHP version...Stefan Gehrig– Stefan Gehrig2011-10-21 12:32:48 +00:00Commented Oct 21, 2011 at 12:32
-
PHP_Compat or upgradephp or look into the manuals comment section.mario– mario2011-10-21 12:34:38 +00:00Commented Oct 21, 2011 at 12:34
Add a comment
|
2 Answers
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).