Jump to content

displaying data in html table


shaddf

Recommended Posts

i have this table

+------+---------------------------------------------------------+---------------------+-------------------+--------+-------+
| P_id |shortname                                                | group_concat(Apps1) | group_concat(Gls) | t_Apps | t_Gls |
+------+---------------------------------------------------------+---------------------+-------------------+--------+-------+
|    1 | Friendly,NDIV V                                         | 1,1                 | 3,0               |      2 |     3 |
|    2 | Friendly,NDIV V                                         | 1,1                 | 1,0               |      2 |     1 |
|    3 | Friendly,NDIV V                                         | 1,1                 | 0,1               |      2 |     1 |
|    4 | Friendly,NDIV V                                         | 1,1                 | 0,0               |      2 |     0 |
|   10 | Friendly,NDIV V                                         | 1,1                 | 0,0               |      2 |     0 |
|   11 | Friendly,NDIV V                                         | 1,1                 | 0,0               |      2 |     0 |
|   12 | Friendly,NDIV V                                         | 1,1                 | 0,0               |      2 |     0 |
|   13 | Friendly,NDIV V                                         | 1,1                 | 0,0               |      2 |     0 |
+------+---------------------------------------------------------+---------------------+-------------------+--------+-------+
8 rows in set, 1 warning (0.29 sec)

how can i populate its data into an html table with this structure using php

<table>      
         <thead>
                    <tr>
                        <th class=" header" colspan="1">2015/2016</th>
                        <th class=" header" colspan="2">NDIV V Lge</th>
                       
                        <th class="  header" colspan="2">Friendlies</th>
                        <th class=" header" colspan="2">Total</th>
                    </tr>
                    <tr>
                        <th class="header">P_id.</th>
                       
                        
                        <th class="  header">Ap</th>
                        <th class="  header">Gl</th>
                        <th class="  header">Ap</th>
                        <th class="  header">Gl</th>
                        <th class="header">Ap</th>
                        <th class="header">Gl</th>
                    </tr>
                </thead>
                <tbody>                                    
                <tr>
                                <td>43</td>
                               
                                
                                <td class=" ">0 + 0</td>
                                <td class=" ">0</td>
                                <td class=" ">0 + 0</td>
                                <td class=" ">0</td>
                                <td>0 + 1</td>
                                <td>0</td>
                            </tr><tr>
                                <td>42</td>
                                
                                <td class=" ">0 + 0</td>
                                <td class=" ">0</td>
                                <td class=" ">0 + 0</td>
                                <td class=" ">0</td>
                                <td>0 + 2</td>
                                <td>0</td>
                            </tr><tr>
                                <td>36</td>
                                
                                
                                <td class=" ">1 + 0</td>
                                <td class=" ">0</td>
                                <td class=" ">0 + 0</td>
                                <td class=" ">0</td>
                                <td>7 + 10</td>
                                <td>2</td>
                            </tr></tbody>
            </table>
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

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.