james13009 Posted December 28, 2007 Share Posted December 28, 2007 This is my code: <a href="javascript:PlayerpopUp(''.$item['nsstream'].'')"> and this is my problems the '.$item['nsstream'].' is calling up an item in the style sheet and must have ' (single quote marks around it) (this item is a link) The javascript is calling a popup link and must put the url in ' (single quote marks) Yet PHP won't let me put '' (two side by side quote marks) without calling an error. I am only a novice at PHP but can anyone help me, what am i doing wrong? James Link to comment https://forums.phpfreaks.com/topic/83518-help-problems-with-single-quote-marks/ Share on other sites More sharing options...
d22552000 Posted December 28, 2007 Share Posted December 28, 2007 use this: <a href="javascript:PlayerpopUp(\''.$item['nsstream'].'\')"> Link to comment https://forums.phpfreaks.com/topic/83518-help-problems-with-single-quote-marks/#findComment-424923 Share on other sites More sharing options...
james13009 Posted December 29, 2007 Author Share Posted December 29, 2007 thank you very much, lifesaver. It work great! Though i do think its odd that solution is: <a href="javascript:PlayerpopUp(\''.$item['nsstream'].'\')"> i would have assumed it would be <a href="javascript:PlayerpopUp('\'.$item['nsstream'].'\')"> or <a href="javascript:PlayerpopUp(\".$item['nsstream']."\)"> or do these work as well? Just odd to me Thanks again. Link to comment https://forums.phpfreaks.com/topic/83518-help-problems-with-single-quote-marks/#findComment-424961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.