hello thr
well im gettin this error "Fatal error: Call to undefined function: array_key_exists() in " in a php file .. the parameters provided are right and nuthin seems to be wrong but i dono y control jus doesnt move on from this function...can any one tell me wat can the reason be?
thank u
Fatal error: Call to undefined function: array_key_exists()
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
im using PHP - 4.0.5
ive also tried the key_exists() function but still i face the same error!!!! actually im modifying code written by someone else and the code is so complicated one file contains thousand lines and it is still passing control to other file which itself contains thousand lines so confusingg:S
ive also tried the key_exists() function but still i face the same error!!!! actually im modifying code written by someone else and the code is so complicated one file contains thousand lines and it is still passing control to other file which itself contains thousand lines so confusingg:S
read the manual here for version info regarding this function
http://se.php.net/manual/en/function.ar ... exists.php
http://se.php.net/manual/en/function.ar ... exists.php
well i tried both functions but nuthin seems to work:S
ERROR:
Fatal error: Call to undefined function: key_exists() in C:\apache\htdocs\kfp\admin\actions\managecompanies.php on line88
code on line 88:
if (!key_exists($companyId, $companyList)) {
if (sizeof($companyList) > 0) {
$keys = array_keys($companyList);
$companyId = $keys[0];
}
companyId is empty when the first time this condition is executed...but ive also tried to assign it a value b4 passin it on but no use still the same error
}
ERROR:
Fatal error: Call to undefined function: key_exists() in C:\apache\htdocs\kfp\admin\actions\managecompanies.php on line88
code on line 88:
if (!key_exists($companyId, $companyList)) {
if (sizeof($companyList) > 0) {
$keys = array_keys($companyList);
$companyId = $keys[0];
}
companyId is empty when the first time this condition is executed...but ive also tried to assign it a value b4 passin it on but no use still the same error
}
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
possible work around (from the manual)
Mark
Code: Select all
function arrayKeyExists($key, $search) {
return in_array($key, array_keys($search));
}