graham23s Posted February 10, 2008 Share Posted February 10, 2008 Hi Guys, i have concatinated this bit of code here: $display_box = ("<div id=\"right\">"); $display_box .= ("<div class=\"boxtop\"></div>"); $display_box .= ("<div class=\"box\">"); $display_box .= ("<p><img src=\"images/image.gif\" alt=\"Product Image\" title=\"Product Image\" class=\"image\" /><b>$product_name</b><br /><br />consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis.<br /></p>"); $display_box .= ("<div class=\"buttons\"><br /><a href=\"additemtocart.php?productid=$productid\"><img src=\"images/cart_navy.gif\" border=\"0\"></a><br /><br /><b>Quantity:</b>"); foreach($quantity as $value) { print("<select name=\"q\"><option value=\"$value\">$value</option>"); } $display_box .= ("</select></div>"); $display_box .= ("</div>"); but the foreach isn't being included inside it can anyone see what i have done? thanks guys Graham Quote Link to comment Share on other sites More sharing options...
trq Posted February 10, 2008 Share Posted February 10, 2008 $display_box = "<div id=\"right\">"; $display_box .= "<div class=\"boxtop\"></div>"; $display_box .= "<div class=\"box\">"; $display_box .= "<p><img src=\"images/image.gif\" alt=\"Product Image\" title=\"Product Image\" class=\"image\" /><b>$product_name</b><br /><br />consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis.<br /></p>"; $display_box .= "<div class=\"buttons\"><br /><a href=\"additemtocart.php?productid=$productid\"><img src=\"images/cart_navy.gif\" border=\"0\"></a><br /><br /><b>Quantity:</b>"; foreach($quantity as $value) { $display_box .= "<select name=\"q\"><option value=\"$value\">$value</option>"; } $display_box .= "</select></div>"; $display_box .= "</div>"; Notice also you don't need (braces) around strings. Quote Link to comment Share on other sites More sharing options...
graham23s Posted February 10, 2008 Author Share Posted February 10, 2008 hey thanks T. Graham Quote Link to comment 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.