Is this a bug ??
| From: | ti980246 at binus dot ac dot id | Date: | Thu, 31 Aug 2000 12:12:23 +0000 |
| Subject: | Is this a bug ?? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-14565@lists.php.net to get a copy of this message | ||
hellow.. is 0 equal with null ??
i've written a code using strpos to get position of substring in a string.. here
is my snippet..
$besar="Sam";
$posisi=strpos($besar,"S");
if ($posisi=="") {print("NULL");}
if ($posisi==0) {print("first position");}
it runs the both if (it prints "NULL and "first position")
the second if means that the substring is on first position in a string... but it
is a null too.. is this a bug ?? or i've misunderstanding the php's variable
concept ?
thank's
________________________________________________________________
__________________ __
___ __ )__(_)__ | / /___ _________
__ __ |_ /__ |/ /_ / / /_ ___/ Binus WebMail
_ /_/ /_ / _ /| / / /_/ /_(__ ) students.binus.ac.id
/_____/ /_/ /_/ |_/ \__,_/ /____/