我的 MySQL 中有一张表,如下所示
============================
id | courses | r_number
----------------------------
1 | English | C/009
2 | Maths | C/009
3 | English | C/003
4 | Maths | C/002
============================
我如何将其输出为类似于下面的 HTML 表
====================================
id | courses | r_number
------------------------------------
1 | English, Maths | C/009
2 | English | C/003
3 | Maths | C/002
====================================