strchr()

Its an alias of strstr() and find the first occurrence of a string

Example

<?php
echo strchr(‘info@phpcodez.com’, ‘@’, true);
?>

Output

info

Share