我想获得与我的 mysql 表相同的结果。在我的桌子下面:
CREATE TABLE IF NOT EXISTS `map_point` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Location` varchar(80) NOT NULL,
`type` varchar(80) NOT NULL,
`icon` varchar(70) NOT NULL DEFAULT '',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=898 ;
类型分别为 Phase1、Phase2……最终的多维数组必须如下所示:
$data = array ( "Phase1" => array("name"=>"Phase 1", "icon"=>"icons/iconb.png"),
"Phase2" => array("name"=>"Phase 2", "icon"=>"icons/icong.png"),
"Phase3" => array("name"=>"Phase 3", "icon"=>"icons/iconr.png"),
"Phase2p" => array("name"=>"Phase 2+", "icon"=>"icons/icony.png"),
"Phase3p" => array("name"=>"Phase 3+", "icon"=>"icons/iconpi.png"),
"RollOut2012" => array("name"=>"Roll Out 2012","icon"=>"icons/iconor.png"),
"RollOut120sites" => array("name"=>"Roll Out 120 Sites", "icon"=>"icons/iconma.png"),
);
预先感谢您的帮助。