note 72314 added to function.strpos
| From: | biraderinbiri at yahoo dot com | Date: | Sat, 13 Jan 2007 08:17:51 +0000 |
| Subject: | note 72314 added to function.strpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121591@lists.php.net to get a copy of this message | ||
Am i missing something or is there a bug? VERY SMILAR model of the offical example is NOT working,
below:
<?php
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
if ($pos === true)
{
echo "The string '$findme' was found in the string '$mystring'";
}
else
{
echo "The string '$findme' was NOT found in the string '$mystring'";
}
?>
Results NOT found! Oh my God... Is it because of boolean usage of === or true=0 but false is
different, what ever, let you programmers take care because that way is NOT working!?
----
Server IP: 139.179.10.17
Probable Submitter: 85.99.242.12
----
Manual Page -- http://www.php.net/manual/en/function.strpos.php
Edit -- https://master.php.net/note/edit/72314
Del: integrated -- https://master.php.net/note/delete/72314/integrated
Del: useless -- https://master.php.net/note/delete/72314/useless
Del: bad code -- https://master.php.net/note/delete/72314/bad+code
Del: spam -- https://master.php.net/note/delete/72314/spam
Del: non-english -- https://master.php.net/note/delete/72314/non-english
Del: in docs -- https://master.php.net/note/delete/72314/in+docs
Del: other reasons-- https://master.php.net/note/delete/72314
Reject -- https://master.php.net/note/reject/72314
Search -- https://master.php.net/manage/user-notes.php