tgavin Posted February 13, 2005 Share Posted February 13, 2005 How should the following be written? [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]echo \"<input name=\\"upmasthead\\" type=\\"radio\\" value=\\"0\\" title=\\"$radioTY\\" onclick=\\"MM_openBrWindow(\'pref_image_browser.php?img=pmasthead&id=$row_rs_newsletter[\'id\']\',\'browser\',\'width=700,height=200\')\\"> Yes\n\";[/span][!--PHP-Foot--][/div][!--PHP-EFoot--] $row_rs_newsletter['id'] is tripping me up. I've tried enclosing it in () but that didn't work. Thanks! Link to comment https://forums.phpfreaks.com/topic/2163-how-should-this-be-written/ Share on other sites More sharing options...
ashoogy Posted February 13, 2005 Share Posted February 13, 2005 Hi there, it should be written as follows: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]echo \" <input name=\\"upmasthead\\" type=\\"radio\\" value=\\"0\\" title=\\"$radioTY\\" onclick=\\"MM_openBrWindow(\'pref_image_browser.php?img=pmasthead&id=\'\".$row_rs_newsletter[\'id\'].\"\',\'browser\',\'width=700,height=200\')\\"> Yes\n \";[/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2163-how-should-this-be-written/#findComment-7118 Share on other sites More sharing options...
obsidian Posted February 13, 2005 Share Posted February 13, 2005 just think of it this way: when you are using an array variable inside of quotes, you don't need to use the single quotes in the brackets "[]"... like this: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] echo \"<input name=\\"upmasthead\\" type=\\"radio\\" value=\\"0\\" title=\\"$radioTY\\" onclick=\\"MM_openBrWindow(\'pref_image_browser.php?img=pmasthead&id=$row_rs_newsletter[id]\',\'browser\',\'width=700,height=200\')\\"> Yes\n\"; [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Link to comment https://forums.phpfreaks.com/topic/2163-how-should-this-be-written/#findComment-7121 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.