// Find the item
if ( $i === null) {
// Default, return the last item
$item = end($array);
}
else if (!array_key_exists($i, $array))
{
// If $i has been specified but does not exist, return false
return false;
}
else
{
$item = $array[$i];
}
return $item;
After
if ($i === null)
{
// Default, return the last item
return end($array);
}
if (!array_key_exists($i, $array))
{
// If $i has been specified but does not exist, return false
return false;
}
// Return the specified item
return $array[$i];
Closing, as this concerns AKeeba file