CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1

    PHP and SQL into cells and rows

    Hey everyone. I have some code that shows results in a table

    Right now it will show 3 cells per row. The issue is that the first row shows 2 then creates a new row with the expected behavior fine after that. How can i get the first row to show 3 cells

    PHP Code:
       if(++$cnt == 0) {
            echo 
    '<tr>';
        } elseif(
    $cnt == 0) {
            echo 
    '</tr><tr>';
        }
     
          echo 
    "<td bgcolor='#009933'><a href='" $row['local_link'] . ".m4v' name='video'>" $row['local_link'] . "</a></td>";
      echo 
    "<td><video width='320' height='240' controls='controls'>
      <source src='" 
    $row['local_link'] . ".m4v" "' type='video/mp4' />
      Your browser does not support the video tag.
    </video></td>"
    ;


      }
      }
    echo 
    "</table>"
    Last edited by Brad Jones; June 26th, 2012 at 12:20 PM. Reason: Changed code tags to php tags
    New to PHP and MySql. Started looking at scripts about a week ago. So far have very little understanding of it. So please be easy with me if I ask a stupid question.

    www.ethans-space.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured