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
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
+ 1
The strstr() function searches for the first occurrence of a string inside another string.
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?
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?
0
I finally got it now. Thanks so much