$main = new Main;
$static = $main->IsStatic();
$static_name = end(explode('/', $_SERVER['SCRIPT_NAME']));
if(in_array($static_name, $static ) {
header("Location: http://google.com");
}else {
$parser = new Parser;
$parser->ParseTemplate();
}
However this is not working. The static variable is an array filled with the names of the static pages (services.php, portfolio.php, clients.php)This is how the static array looks,
Array
(
[0] => Array
(
[page_name] => services.php
)
[1] => Array
(
[page_name] => portfolio.php
)
[2] => Array
(
[page_name] => clients.php
)
)
Is it not working because it's a multidimensional array?