check is a value is on an string php

PHP
if (strpos($string, 'substring') !== false) {
	// do stuff 
}str_contains('STRING', 'SUB_STRING');
Source

Also in PHP: