Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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 = 'USER@EXAMPLE.com';
  echo stristr($email, 'e'); // outputs ER@EXAMPLE.com
  echo stristr($email, 'e', true); // outputs US
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #stristr
ADD COMMENT
Topic
Name
3+4 =