Write a PHP script to extract the user name from the following email ID

  • برمجة بي اتش بي

Write a PHP script to extract the user name from the following email ID.

Sample String : 'rayy@example.com'

الأجوبة

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

Sample Output:

rayy
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...