note 53608 deleted from function.strstr by didou
| From: | didou@php.net | Date: | Tue, 07 Jun 2005 13:40:04 +0000 |
| Subject: | note 53608 deleted from function.strstr by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90060@lists.php.net to get a copy of this message | ||
Note Submitter: fgaab at web dot de
Reason: bad code
----
strstr does not work with a string as second parameter. It just works with single characters.
Example (does not work):
<?
$stack = 'The quick brown fox jumps over ...';
$needle = 'quick';
echo strstr($stack, $needle); // returns 'The quick brown fox jumps over ...'
?>
Example (works fine):
<?
$stack = 'The quick brown fox jumps over ...';
$needle = 'q';
echo strstr($stack, $needle); // returns 'uick brown fox jumps over ...';
?>
What's wrong?
Thanx for your help.