Re: replace ' with "
| From: | Kim Steinhaug | Date: | Wed, 11 Feb 2004 22:21:46 +0000 |
| Subject: | Re: replace ' with " | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177461@lists.php.net to get a copy of this message | ||
Depending on the use you might also want to look at this one :
htmlentities()
If working with mySQL inserts consider this aswell :
mysql_escape_string()
And finally, javascripts in HTML doesnt like either the ' " or the
equivilant htmlentities. I just wash them away direkt if i need to
output something into a javascript statement, eg.
<a href="javascript: dome('typicaltext');">
The above example caused me alot of headaches when the text inside '
contained either ' or ", and even the entities also messed up.
--
Kim Steinhaug
----------------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
----------------------------------------------------------------------
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
----------------------------------------------------------------------
"Diana Castillo" <diana@interhotel.com> wrote in message
news:20040211143421.39500.qmail@pb1.pair.com...
> How do I replace all single quotes with double quotes in a string for
> echoing it with the double quotes?
>
> --
> Diana Castillo
> Global Reservas, S.L.
> C/Granvia 22 dcdo 4-dcha
> 28013 Madrid-Spain
> Tel : 00-34-913604039 ext 214
> Fax : 00-34-915228673
> email: diana@hotelkey.com
> Web : http://www.hotelkey.com
> http://www.destinia.com