How can I put data from a database into a array.
ie
this is would like to end up with
$data = array(
"Won" => 10,
"Lost" = > 5,
"Drawn" => 5);
But my database only contains numbers like so
$result=mysql_query("select count(*) as count from wars_completed where c_wld='1'");
)
the c_wld means completed game won/lost/drawn
1 = won
2 = lost
3 = drawn
so I know i could start the array like
$data - array("won", "lost", "drawn");
how can i put it togther ??
thanks if you can help
Lee