From: [EMAIL PROTECTED]
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
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php