0

Please can someone tell me into details the work of strstr() php function.

I am trying to understand it but it seems I'm taking the function for another thing. Thank you

2nd Jul 2017, 1:20 PM
Somoye Michael Plus_Baba
5 odpowiedzi
+ 4
<?php $email = 'name@example.com'; $domain = strstr($email, '@'); echo $domain; // prints @example.com $user = strstr($email, '@', true); // As of PHP 5.3.0 echo $user; // prints name ?> read more here https://cheeze.club/vneu
2nd Jul 2017, 1:46 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 1
The strstr() function searches for the first occurrence of a string inside another string.
2nd Jul 2017, 1:45 PM
Emna Hachicha
Emna Hachicha - avatar
0
Thank you so much Emma Hachicha. I will try it once I'm on pc. I am a month coder and I will love to follow you. Can I?
4th Jul 2017, 6:22 AM
Somoye Michael Plus_Baba
0
Thank you Cheeze, seems your explanation is the best, so basically, you are trying to use the function to look for "@" in the email right? I think I'm getting familiar now, I wil try it and feed you back. May I follow you too?
4th Jul 2017, 6:24 AM
Somoye Michael Plus_Baba
0
I finally got it now. Thanks so much
6th Jul 2017, 6:59 AM
Somoye Michael Plus_Baba