I have the following example:
I have an array of values in config\resources.php - eg.:
<?php
define('resrc', array(
'logo' => 'src/images/logo.png',
'bscss' => 'src/bootstrap.css',
'bsthcss' => 'src/bootstrap-theme.css',
'bsjs' => 'src/js/bootstrap.js',
'chset' => 'utf-8',
'jquery' => '/src/jquery/jquery_1.12.4_min.js',
)
);
?>
Now in the structure\head.php I have something like this:
<?php
require('config/resources.php');
class Head {
public static $head;
public static function renderHeadTag() {
$head = "<head>";
$head .= "<meta charset=".$resrc['chset'].">";
$head .= "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">";
$head .= "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">";
$head .= "</head>";
return $head;
}
}
?>
but I still can't get the value of the array. It is quite a while since i were doing something like this. Can anybody give a hint?