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>
Edited by shaddf
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.