<?php
$user = array('bla' => 1, 'abcStudy' => 0,
'blubb' => 0, 'xyzStudy' => 1, 'derp' => 0);
$found = false;
foreach ($user as $key => $val) {
if ($val == 1 && substr($key, -5) == 'Study') {
$found = true;
echo "Found a one in ".$key."\n";
break;
}
}
if ($found) {
// do something
echo 'I found something';
}