Hi Chris,
I've always used strstr() for this _exact_ same purpose and it's worked just
fine. I find it much more useful as an InStr()-like function than for
actually doing anything with the string it returns. You'll want to note
that the parameter order is $haystack before $needle. That goes fo
Hmm... Are you sure strpos doesn't work for you? Sure worked for me when I
wanted something like that Otherwise, checkout following:
http://se2.php.net/strings
function instr($needle, $haystack,$case_sensitive=true)
{
return
(($case_sensitive?strpos($needle,$haystack):stripos($needle,$haystack))!=
2 matches
Mail list logo