So I'm trying to display an array in PHP. This is my index.php
<?php
require_once 'core/init.php';
echo GET::get('mysql/host');
?>
My Config.php
<?php
class Config{
public static function get($path = null){
if($path){
$config = $GLOBALS['config'];
$path = explode('/', $path);
print_r($path);
}
}
}
And finally my init.php
<?php
session_start();
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '127.0.0.1',
'username' => 'root',
'password' => 'wayne123',
'db' => 's'
),
'remember' => array(
'cookie_name' => 'hash',
'cookie_expiry' => '604800'
),
'session' => array()
'session_name' => 'user'
);
spl_autoload_register(function($class){
require_once 'classes/'. $class.'.php';
});
require_once 'functions/sanitize.php';
?>
When I go to index.php in the browser I don't see the array, which is weird since I'm pretty sure everything is fine. Could this be a file location issue? How can I tell what the error is? Since All I get is a blank page. Any ideas would be wonderful