我想用php创建一个表的图形表示?

There is a table of data which is updated regularly, I want to create a graphical representation such as a bar graph to represent the data. But on the page I would like to have a drop down box where you select one level. I suppose it creates a cascade of tables so you have multiple layers so the top layer will show the over all totals, the next layer will split it out, the third level would split it out further.

You could try searching for some libraries like PHPlot to get you started...

Another aproach could be creating your own functions and using PHP to write inline styling to your bar elements, such as:

<div class="bar" style="height:<?php echo getHeight(elementIndex); ?>"></div>

This needs to be far more complex, but just to give you some ideas.

Use phpgraphlib it is super easy to use, free and there is no company logos or links.

http://www.ebrueggeman.com/phpgraphlib