Adsense

What is the difference between strstr() and stristr()?

strstr -- Find first occurrence of a string

strstr() example

<?php
$email = 'user@example.com';
$domain = strstr($email, '@');
echo $domain; // prints @example.com
?>

stristr -- Case-insensitive strstr()

stristr() example


<?php
$email = 'USER@EXAMPLE.com';
echo stristr($email, 'e');
// outputs ER@EXAMPLE.

1 comment:

comment here

newest questions on wordpress