Jump to content

How to create this matrix table?


skybeta

Recommended Posts

I have a table from SQL that has 3 columns with following datas:

 

A B C

1 2 10

1 3 12

2 1 20

2 4 30

3 1 20

4 6 22

4 5 14

I would want to create  table to display the data like this:

 

A is the row and B is the column, and C is the value of A match B

B

A 1 2 3 4 5 6

1 10 12

2 20 30

3 20

4     14   22

 

What will be the best way to do it? Should I create an array? IF so, grateful if you can teach me how to do it!

Thx in advance!

Link to comment
https://forums.phpfreaks.com/topic/202833-how-to-create-this-matrix-table/
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.