Forum Moderators: coopster
<?php$text = 'safelogin.org<hr />no keylogging';
$text_before_needle = strstr($text, '<hr />', true);
$text_after_needle = strstr($text, '<hr />', false);
echo 'text_before_needle='.$text_before_needle.'<br />';
echo 'text_after_needle='.$text_after_needle.'<br />';
?>
of course I read:
[nl3.php.net...]
but I can't find whats wrong.
so I got a string (haystack), then want to get the string before the search-thing (needle), then want to get the string after the needle.
what am I overlooking?