keep getting this error code:
PHP Parse error: syntax error, unexpected T_VARIABLE
Here is the code:
Code: Select all
function myRouter($urls){
$urls=array( 1 =>'about.php',
2 =>'photos.php',
3 =>'contact.php',
4 =>'home.php'
);
if (in_array($_GET['page'],array_keys($urls))) {
readfile $urls[$_GET['page']];
} else {
readfile $urls[4];
}
}
echo myRouter() ;
Thanks in advance.
Batoe