Which function?
| From: | Gustav Wiberg | Date: | Thu, 30 Aug 2007 08:25:00 +0000 |
| Subject: | Which function? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-28413@lists.php.net to get a copy of this message | ||
Hi there!
Is there ant predefined function for doing this?
I want to put text (from a database) inside quotes, like for example
Javascript:window.alert('<?php echo $dbText;?>');
Is there any function in PHP for translating $dbText into something that Javascript would accept?
(something inside quotes)
I tried with http://se.php.net/manual/sv/function.htmlentities.php
but that didn't seem to work
Best regards
/Gustav Wiberg
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.484 / Virus Database: 269.12.12/979 - Release Date: 2007-08-29 20:21