Jump to content

Php and js help


mike1313

Recommended Posts

I didn't know whether I should have posted this in the PHP forum or the JavaScript but I can't seem to get this to work. Bit of a noob question.

echo "<b><a href=# onclick=displayMessage('message.inc');return false>$who2[username]</a></b><br>";

 

And it doesn't work with "" for the onclick function so how can I make this work?

Link to comment
Share on other sites

'tis a PHP question.. you got the forum right.

 

Your echo is between double quotes " -- "

 

If you need to use double quotes inside the double quotes, they need to be escaped (prepended with back slash).

echo "<table border=\"1\"><a href=\"http://etcetc.com\">etcetc.com</a></table>";

 

PhREEEk

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.