Jump to content

Help problems with ' (single quote marks)


james13009

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.