如何用一些修改显示使用php的记录[重复]

This question already has an answer here:

I have record of table in bellow:

| id_sub   | id_cri | poin  |
------------------------------
|    S1    |   C1   |   20  |
|    S2    |   C1   |   10  |
|    S1    |   C2   |   15  |
|    S2    |   C2   |   25  |
|    S1    |   C3   |   17  |
|    S2    |   C3   |   10  |
|    S1    |   C4   |   20  |
|    S2    |   C4   |   12  |

And I want to show record of table using php as bellow,

| Result   | C1 | C2 | C3 | C4 |
--------------------------------
|    S1    | 20 | 15 | 17 | 20 |
|    S2    | 10 | 25 | 10 | 12 |

Please help me solve this, sorry my language is bad

</div>