How would you write the code to make a table center in the page, 5 rows, two columns? I know how to do it in html, but when I add this for php it gives me errors:

(this is just the beginning of the code)
<table width=700 align="center">
<tr>
{
echo<td width="350"><tr><td bgcolor=0000ff><font color=ffffff size=3><b>".$story['item_name']."</B></font>";

    Maybe this should work

    echo"<td width=350><tr><td bgcolor=0000ff><font color=ffffff size=3><b>".$story['item_name']."</B></font>";

      Thanks, but where does it show the table set up?

      I want tomake it 600 wide
      5 rows
      2 columns,
      I need to put products inside of each box.

        Basic html but:

        Simply escape out of php mode into standard html then <?PHP echo "$var"; ?> in the relvant cells as needed.

        The problem you have is that because your html contains unescaped double quotes, your echo is dropping out early and php then doesn't know what to do with the rest so you get parse errors.

        If you insist on echo 'ing all your normal html, just make sure you escape those dbl quotes, or leave 'em out!

        echo "<div align=\"center\">\n<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";

        etc etc

          apologies for the dummy reply (now edited) as I had failed to properly read your first post!

            Write a Reply...