stristr()

It find the first occurrence of a string(case insensitive)

Example

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

Output

info

Share