I have a class(DaySummary*) with a static function that I've created:
public static function recursive_in_array($search, $arr) {
foreach ($arr as $item) {
if(is_array($item))
return recursive_in_array($search, $item);
elseif($search == $item)
return true;
}
return false;
}
Within the code in another function (not a static function in the class) I try to use this function by doing:
if(self::recursive_in_array('taanitE', $exceptions))
echo 'it is';
else
echo 'it isn"t';
But I get an error saying:
Call to undefined function recursive_in_array()
Why do I get this error? The function is clearly defined!
*DaySummary is inherited from DayAnalyzer which is inherited from DayData.