I'm getting an error:
Undefined offset: 1
This is the code. It gives the error on this line:
list ($controller,$method) = explode("@", $match['target']);
Full code:
<?php
include(__DIR__ . "/bootstrap/start.php");
include(__DIR__ . "/routes.php");
$match = $router->match();
list ($controller,$method) = explode("@", $match['target']);
if (is_callable(array($controller, $method))) {
$object = new $controller();
call_user_func_array(array($object, $method), array($match['params']));
} else {
echo "Cannot find $controller -> $method";
exit();
}
Screenshot: