Hi,
Try this:
$tooltip = "Sam
%27s"
echo " onhover=\"showtext(
'$tooltip
',ToolTip);\"\n";
note the
%27 to replace the
single quote in your variable...
NOTE - to use some special characters like ',' or '<' and '>' they needed to be escape-coded in form %HH, where HH is the hex code of the character.
e.g.: ',' = %2C
and the showtext
text parameter between
single quotes .... without them, the output is
Sam's,ToolTip ....
SAlut.