How can I add key value pairs to an array?
This won\'t work:
public function getCategorieenAsArray(){ $catList = array(); $query = \"SELECT
Use the square bracket syntax:
if (!empty($row["title"])) { $catList[$row["datasource_id"]] = $row["title"]; }
$row["datasource_id"] is the key for where the value of $row["title"] is stored in.
$row["datasource_id"]
$row["title"]