Jump to content

Archived

This topic is now archived and is closed to further replies.

Gruzin

Quick syntax question

Recommended Posts

hi guys,
I'am trying to add [b]confirm[/b] function to my php echo, but think it's not correct. Please tell me what's wrong with it? Thanks in advance.

[code]echo "<a href=".$delete."onClick='return confirm('are u sure?');'>Delete</a>";[/code]

Share this post


Link to post
Share on other sites
Use double quotes:
[code]echo "<a href=\"" . $delete . "\" onClick=\"return confirm('are u sure?');\">Delete</a>";[/code]

Share this post


Link to post
Share on other sites

×

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.