Our site has a function that grabs all of the navigation items and the sub navigation items as follows:
function setNav($sectionID = 0) {
$divs = $db->getData("SELECT *
FROM table
WHERE Section = ".$sectionID);
foreach ($divs as $div) {
$subArray = setNav($div['ID']);
$thisArray[$div['ID']]['ID'] = $div['ID'];
$thisArray[$div['ID']]['Title'] = $div['Title'];
$thisArray[$div['ID']]['Children'] = $subArray;
}
return $thisArray;
}
It worked fine when we used the mssql_ functions, but since switching to a new version of PHP where that is depreciated, it’s throwing up an error saying:
Fatal error: Maximum function nesting
level of ‘100’ reached, aborting!
This limit is set by xdebug. Check your php.ini and comment out the line that loads the xdebug library and then restart your web server.
Beyond that, you may wish to refactor your code to use nested sets in the future.