I am having trouble getting variables to feed into and name arrays.
How can I get the page environment to feed my configuration file?
...or, declared manually via $strPagename = 'the_page_name'😉
I have a nested array, but the var declared in the initiating document does not pass it to the array name... for example:
FILE: index.php
<?php
global $strPagename = 'index';
require ('config.php');
require ('header.php');
<div id="Content">
<p>content here</p>
</div>
require ('footer.php');
?>
FILE: config.php
<?php
$aryConfig = array(
$strPagename => array (
"name1" => "value1" ,
"name2" => "value2" ) ,
);
?>
The name/val pairs feed the header and footer.
My result is a completely blank file. WTF?
Thanks in advance...
PS - If you have suggestions for tutorials about this please tell me! I live "php.net/docs.php" but if you have any sources for good learning on this - clue me in, please!