poleposters Posted April 11, 2008 Share Posted April 11, 2008 I have a piece of javascript <a href="page.html" target="popup" onClick="wopen('page.html', 'popup', 300, 200); return false;"> But I want to echo it in my PHP script but am having trouble working out how to preserve the codes quotation marks when I echo it within quotation marks. Can someone please help? Quote Link to comment https://forums.phpfreaks.com/topic/100672-solved-echoing-javascript-in-a-php-script/ Share on other sites More sharing options...
conker87 Posted April 11, 2008 Share Posted April 11, 2008 <?php echo "<a href=\"page.html\" target=\"popup\" onClick=\"wopen('page.html', 'popup', 300, 200); return false;\">"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/100672-solved-echoing-javascript-in-a-php-script/#findComment-514859 Share on other sites More sharing options...
poleposters Posted April 11, 2008 Author Share Posted April 11, 2008 Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/100672-solved-echoing-javascript-in-a-php-script/#findComment-514887 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.