programming-examples/php/String/PHP script to extract the user name from the following email ID.php
2019-11-15 12:59:38 +01:00

5 lines
96 B
PHP

<?php
$mailid = 'rayy@example.com';
$user = strstr($mailid, '@', true);
echo $user."\n";
?>