RE: [PHP] Need an explanation as to what this line does...
| From: | John W. Holmes | Date: | Sat, 01 Feb 2003 22:13:43 +0000 |
| Subject: | RE: [PHP] Need an explanation as to what this line does... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133926@lists.php.net to get a copy of this message | ||
> $stuffArray[$i][value] = strtr($stuffArray[$i][value],
> array_flip(get_html_translation_table(HTML_ENTITIES)));
>
> To be bluntly honest, I don't understand hardly any of it, and the PHP
> Manual isn't helping this time.. maybe I'm weekend-stupid or
something..
It converts HTML entities back to their original characters. Where
htmlentities() and htmlspecialchars() will take characters like <, >,
and & and turn them into <, >, and &, the code you have will
take those entities and turn them back into <, >, and &.
It's all explained on the get_html_translation_table() manual page, if
you care to read the manual.
http://www.php.net/manual/en/function.get-html-translation-table.php
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/