[SOLVED]overLib in php variable.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
boss01
Forum Newbie
Posts: 19
Joined: Sun May 27, 2007 3:31 pm

[SOLVED]overLib in php variable.

Post 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.
Last edited by boss01 on Tue Oct 30, 2007 6:50 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Escape them.

\'
boss01
Forum Newbie
Posts: 19
Joined: Sun May 27, 2007 3:31 pm

Post by boss01 »

And dang it worked! Thanks for help Feyd :)
Post Reply