programming-examples/php/String/PHP script to extract the user name from the following email ID.php

5 lines
96 B
PHP
Raw Normal View History

2019-11-15 12:59:38 +01:00
<?php
$mailid = 'rayy@example.com';
$user = strstr($mailid, '@', true);
echo $user."\n";
?>