我真的坚持了这个从1周开始,任何人都可以帮我创建一个数组,用数据库动态创建一个分组类别在Highcharts中动态使用php.Here是一个表的例子
<pre><code>
+-------+---------------+---------------------------+
|BATCH | CATEGORY | GENDER |
+-------+---------------+---------------------------+
| 2012 | General | Male |
| 2012 | Test | Female |
| 2013 | General | Female |
| 2013 | Test | Male |
+-------+---------------+---------------------------+
</code></pre>
我希望这个表格的结构如下
<pre><code>
Array ( [0] =>
Array ( [name] => 2012
[categories] =>
Array ( [0] => Array ( [name] => General
[categories] => Array ([0] => Male ))
[1] => Array ( [name] => Test
[categories] => Array ([0] => Female ))))
[1] =>
Array ( [name] => 2013
[categories] =>
Array ( [0] => Array ( [name] => General
[categories] => Array ([0] => Female ))
[1] => Array ( [name] => Test
[categories] => Array ([0] => Male ))))
)
</code></pre>
请帮助我.......