0) { for($i=0;$i]+)>/i", "", $arrSections[$i], 1); $curIndex = $i + 1; $prevIndex = $i == 0 ? 1 : $curIndex - 1; $nextIndex = $i >= count($arrSections) ? count($arrSections) : $curIndex + 1; $pageID = 'page'.$curIndex; $nextPage = 'page'.$nextIndex; $prevPage = 'page'.$prevIndex; // Handle first block if($i == 0) { $strPaginated .= '
'. $arrSections[$i]; // Only show the "More" link if there is more than 1 section if(count($arrSections) > 1) { $strPaginated .= 'More >'; } $strPaginated .= '
'; } else { // Hide the other blocks $strPaginated .= ''; } } return<< var currentPage = 'page1'; PAGE_CODE; } return $strContent; } // End Function } // End Class ?>