Ok, so I got this far…..
$keya outputs feelings_$ and medical_use_$ which is CORRECT….. But… this still doesn’t work.
$rootkeys[] = $_GET;
foreach($rootkeys as $rootkey) {
foreach($rootkey as $key => $value) {
$partialkey = explode("$",$key);
$keya = $partialkey[0].'$';
$where = str_replace("meta_key = $keya", "meta_key LIKE 'feelings_%", $where);
}
}
return $where;