How do you find first occurrence of a character in a string PHP? code example
Example: php find first occurrence in string
#You can use the strpos() function
$cheese = "cheese";
strpos($cheese, 'h');
#Output: 1
#You can use the strpos() function
$cheese = "cheese";
strpos($cheese, 'h');
#Output: 1