note 68785 rejected from function.include by betz
| From: | betz@php.net | Date: | Thu, 10 Aug 2006 18:17:00 +0000 |
| Subject: | note 68785 rejected from function.include by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-115769@lists.php.net to get a copy of this message | ||
Note Submitter: stephen dot kd dot johnston at gmail dot com
----
I've got a question on how to make somthing work. I've got the following code:
<?
$navigation_menu['top']['Home']['url'] = "index.html"
?>
and then I got this code which outputs the menus
<?
foreach($navigation_menu['top'] as $name => $link) {
echo "<a href=\"{$link['url']}\">{$name}</a>";
}
?>
how do i get the following to work in coordination wiht the above and load the pages dynamically:
<?
if(is_array($VirtualPage))
echo $VirtualPage['content'];
elseif(file_exists("include/$Page.php");
include("include/$Page.php");
?>