1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP HTML table

Discussion in 'Web Development' started by fairfax, Jun 21, 2012.

  1. fairfax

    fairfax New Member

    hey guys,
    i have a PHP function that reads a file into a resulting array. i then need to use the rows in the PHP array to populate an HTML table. the problem is that the rows are a mixture of single elements (header lines) and rows of 5 elements (table columns). i need the single element rows to span across the 5columns where the tabbed data is below. all the data rows (with 5 elements) have a "+" sign in them, meaning that i can test for pos of + sign to determine whether the row is one header or 5 <TD>s. any pointers? i am thinking that JS is the way to go but i am new to that.
     
  2. Geoff Tyrer

    Geoff Tyrer Member

    You describe the scenario but what's the problem?

    I don't know much about PHP but in HTML you would set colspan to 5 in your header rows.