- strpos: documentation ( source)
<?php
$os =array("Mac/OSX","PC/Windows" );
$string = "Mac";
foreach ($os as $data) {
echo $data;
if (strpos($data,$string ) !== FALSE) {
echo "Match found";
}else{
echo "not found";
}
}