function shrinktheweb_getArrayValue in ShrinkTheWeb 8
Same name and namespace in other branches
- 6 shrinktheweb.api.inc \shrinktheweb_getArrayValue()
- 7 shrinktheweb.api.inc \shrinktheweb_getArrayValue()
Safe method to get the value from an array using the specified key.
Parameters
$aArray:
$sKey:
bool $isReturnSpace:
Return value
bool|string
File
- ./
shrinktheweb.api.inc, line 810
Code
function shrinktheweb_getArrayValue($aArray, $sKey, $isReturnSpace = FALSE) {
if ($aArray && isset($aArray[$sKey])) {
return $aArray[$sKey];
}
// If returnSpace is true, then return a space rather than nothing at all.
if ($isReturnSpace) {
return ' ';
}
else {
return FALSE;
}
}