PHP найти первое появление в строке
#You can use the strpos() function
$cheese = "cheese";
strpos($cheese, 'h');
#Output: 1
Scam_Cat
#You can use the strpos() function
$cheese = "cheese";
strpos($cheese, 'h');
#Output: 1
<?php
$email = 'name@example.com';
$domain = strstr($email, '@');
echo $domain; // prints @example.com
$user = strstr($email, '@', true);
echo $user; // prints name
?>