Bug #15468: problem with array_key_exists
| From: | paja at onride dot com | Date: | Sat, 09 Feb 2002 18:20:26 +0000 |
| Subject: | Bug #15468: problem with array_key_exists | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-79830@lists.php.net to get a copy of this message | ||
From: paja@onride.com
Operating system: Linux d2 2.2.20-ow1-procmax-smp
PHP version: 4.1.1
PHP Bug Type: Arrays related
Bug description: problem with array_key_exists
Hello,
I'm trying function array_key_exists in this sample script, but doesn't
work:
<?
$a="ap";
$pole = array(1 => "ap", "aa", "dd");
if (array_key_exists($a, $pole)):
echo "The element is in the array";
endif;
?>
but when using:
$pole = array("ap" => 1, "aa" => 2, "dd" => 3);
it's working. Can somebody look at this problem?
Thanks,
Pavel Hrabal
--
Edit bug report at http://bugs.php.net/?id=15468&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15468&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15468&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15468&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15468&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15468&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15468&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15468&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15468&r=submittedtwice