I have the following code in PHP:
$stmt2 = $dbh->prepare("select GROUP_CONCAT( cohort_id SEPARATOR ',') as cohort_id from ( select distinct cohort_id from table_cohorts) as m");
$stmt2->execute();
$row2 = $stmt2->fetch();
$cohorts_allowed = explode(",",$row2["cohort_id"]);
$value = array ('amount', $cohorts_allowed );
$cohorts_allowed gives me something like "database_percent, national_percent". It is generated from all the possible cohort_ids in my database.
What I need to do is get all of these and add in the additional value 'amount' (which is not in my database) into the array.
How can I do this. You can see I tried to do this on the last line of my code above, but obviously that doesn't work.