I was thinking that I could use a group_concat in an mysql query to create an array on the fly that could be used elsewhere in my script. Say I have a line like this in the query:
GROUP_CONCAT(CHOICE_ID,'=>"',RESPONSE_TEXT,'"') AS 'CHOICE_TEXTS',
...which DOES seem to work, as it gives me the following output (when I use print_r()to show it)
9=>"Yes",10=>"No-transition",11=>"No-disruption",12=>"Assessment"
...but it does not seem to behave as an array when I try to...
echo "<table>";
foreach($line[CHOICE_TEXTS] as $k=>$val) {echo "<tr><td>$k</td><td>$val</td></tr>";}
echo "</table>";
...seems like I'm kind of close here. any hints on how to get this raw string to behave as an array?
9=>"Yes",10=>"No-transition",11=>"No-disruption",12=>"Assessment"
Thanks