note 53608 added to function.strstr

From: Date: Tue, 07 Jun 2005 12:13:41 +0000
Subject: note 53608 added to function.strstr
Groups: php.notes 
Request: Send a blank email to php-notes+get-90050@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.strstr.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53608 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53608&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53608&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53608&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53608&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53608&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53608&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#90050) next »