flemingmike Posted October 7, 2010 Share Posted October 7, 2010 i know i have it wrong, cant figure it out. anybody able to help? echo "<td align='center'><a href="#" onmouseover="alert('" . $customer . " <br /> " . $address . "');return false">" . $customer . "</a></td>"; Quote Link to comment https://forums.phpfreaks.com/topic/215340-correct-or/ Share on other sites More sharing options...
Adam Posted October 7, 2010 Share Posted October 7, 2010 You need to escape double quotes used within a string delimited by double quotes, however it's easier to use single quotes to delimit the string when working with HTML: echo '<td align="center"><a href="#" onmouseover="alert(\'' . $customer . ' <br /> ' . $address . '\');return false">' . $customer . '</a></td>'; Quote Link to comment https://forums.phpfreaks.com/topic/215340-correct-or/#findComment-1119811 Share on other sites More sharing options...
flemingmike Posted October 7, 2010 Author Share Posted October 7, 2010 thanks! Quote Link to comment https://forums.phpfreaks.com/topic/215340-correct-or/#findComment-1119815 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.