note 72275 deleted from function.str-replace by nlopess
| From: | nlopess@php.net | Date: | Wed, 10 Jan 2007 20:31:06 +0000 |
| Subject: | note 72275 deleted from function.str-replace by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121542@lists.php.net to get a copy of this message | ||
Note Submitter: isaac77
----
Note regarding the code provided by 'heavyraptor' below, which converts accented
characters:
To get the code to work, I had to change the line
<?php $str = htmlentities($str); ?>
to something like
<?php $str = htmlentities($str, ENT_QUOTES, 'UTF-8'); ?>
My problem may have had something to do with the version of php or some default settings, as I found
it necessary to specify UTF-8 on one server but not another.
Thanks to the original posters for the code!