I have been trying to achieve this for some time, but I have not been able to, so I decided to turn to this community.
I need to dynamically generate a table like the following image, which must be generated from an Mysql database, for example, if a vessel contains 2 vehicle models, the model is added under "CITY" with its Corresponding amount, some idea of how to achieve it, I have tried with arrays, but I do not succeed.
Any help is good, thank you in advance and greetings!