- strpos: documentation ( source)
<?php
$currentproduct = "Big fat Vest";
$groupID = array("Vest", "Snapback", "Sock", "Cap", "Top", "Tee", "T-Shirt");
if (strpos($groupID, $currentproduct)) {
$_customGroupID = "68";
}
else {
$_customGroupID = "89";
}
echo "group id is " . $_customGroupID; ?>