ob_start(); print_r($layout_pages); $aaa = ob_get_contents(); ob_end_clean(); error_log($aaa);