Answers for "php strstr()"

PHP
2

php stristr

#Case-insensitive strstr()
#stristr(string $haystack, string $needle, bool $before_needle = false): string|false
#Returns all of haystack starting from and including the first occurrence of needle to the end.

<?php
  $email = '[email protected]';
  echo stristr($email, 'e'); // outputs [email protected]
  echo stristr($email, 'e', true); // outputs US
?>
Posted by: Guest on August-11-2021

Browse Popular Code Answers by Language