Forum und email
stristr

stristr

(PHP 3 >= 3.0.6, PHP 4, PHP 5)

stristr --  strstr() bez rozlišení velikosti písmen

Popis

string stristr ( string haystack, string needle )

Vrací haystack od prvního výskytu needle do konce. needle a haystack se zkoumají bez ohledu na velikost písmen.

Pokud needle nenajde, vrací FALSE.

Pokud needle není řetězec, převede se na integer a použije se jako číselná hodnota znaku.

Příklad 1. Příklad použití stristr()

<?php
  $email
= '[email protected]';
  
$domain = stristr($email, 'e');
  echo
$domain; // [email protected]
?>

Viz také strchr(), strrchr(), substr() a ereg().