If you need to be more generic, then use strpos. For example, if you need to check for the abbreviation at the beginning of the word, but it could be more or less than 4 characters, do this:
$needle = "CSPG"; // substitute any string you are looking for
if (strpos($productdetails, $needle) === 0) {
do something;
}
You must use === because strpos will return false if it can't find the string, and 0 if it finds it at the beginning of your string. If you use ==, then when strpos returns FALSE, the condition will evaluate as true, and "do something" will happen even though it didn't find a match.