А сделайте так:
$groups = [
"power-group" => ["pump", "abs-bums", "super-strong", "fitball", "fit-cross", "body-sculpt", "lab", "hell-scretch", "witch-ball", "body-pump", "abs"],
"static-group" => ["mfr", "healthy-back", "pilates", "twine-school", "yoga", "open-day", "lfk-50", "yoga-in-gamake", "interval"],
"aerobics-group" => ["joint-gymnastics", "press-stretch", "abs-stretch", "joint-gymnastics-stretch", "abl", "make-body", "mobility", "stretch"],
"dance-group" => ["latina", "tabata", "aerobics", "fitness-dance", "latina-start", "latina-pro"]
];
$group = NULL;
foreach($groups as $key => $value)
{
for($i = 0; $i < count($value); $i++)
{
echo $value[$i] . " =? " . rawurlencode($trainings[1]) . '<br />';
if($value[$i] == $trainings[1])
{
$group = "sport";
break;
}
}
if (!is_null($group))
{
break;
}
}