- array_intersect: documentation ( source)
- explode: documentation ( source)
<?php
$day_str = '1,7';
$result_str = '1,2,3,4,7';
$result = explode(',',$result_str);
$days = explode(',',$day_str);
if(count(array_intersect($result, $days)) == count($days)){
echo "$day_str are in $result_str";
}else{
echo "$day_str are not in $result_str";
}
?>