- stripos: documentation ( source)
<?php
$PUPILPREMIUMFILTER = 'Y';
if(stripos($PUPILPREMIUMFILTER, 'Y') === 0) {
echo " and pp.eligible = 1";
} elseif(stripos($PUPILPREMIUMFILTER, 'N') === 0) {
echo " and pp.eligible IS NULL";
} else { echo ""; }
?>