Jump to content

Archived

This topic is now archived and is closed to further replies.

tgavin

How should this be written?

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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--]

Share this post


Link to post
Share on other sites

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--]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.