Is there one for the apostrophe?? I've looked in tables of html entities and can't find one...
I'm using php to write javascript...
using this in php
$myContact->getAddPopupUrl("$name", "$company", "$p_key")
Call this method getAddPopupUrl which prints a href:
function getAddPopupUrl($name, $cname, $p_key) {
return "<a href='javascript:myContactsPopUp(\"$name\", \"$cname\", \"$p_key\")'><img src='/graphics/mycontact_add.gif' border='0' title=\"Add to MyContacts list\"></a>";
}
I have tried adding slashes to the variables $name, $company before using the method, but that just breaks the javascript. I though I might just be able to convert the ' to the html entity since addslashes didn't work...
Any ideas? Thanks 🙂