Page 1 of 1

[SOLVED]overLib in php variable.

Posted: Mon Oct 29, 2007 3:23 pm
by boss01
I got php code like that:

Code: Select all

$output2 .= '<a href="javascript:void(0);" onclick="return overlib('This is a sticky  with a caption. And it is centered under the mouse!', STICKY, CAPTION, 'Sticky', CENTER);" onmouseout="nd();">Click here!</a>';
You probarly see right away ' ' inside the html code. What causes a error... When i replace them with " " the php will not print any errors but overLib wont work. Soo someone got some nice idea how to get this code to work.

Posted: Mon Oct 29, 2007 5:32 pm
by feyd
Escape them.

\'

Posted: Tue Oct 30, 2007 5:00 am
by boss01
And dang it worked! Thanks for help Feyd :)