I simply copied the code from INVO tutorial
$di->set('db', function() use ($config) { $dbclass = 'Phalcon\Db\Adapter\Pdo\' . $config->database->adapter; return new $dbclass(array( "host" => $config->database->host, "username" => $config->database->username, "password" => $config->database->password, "dbname" => $config->database->name )); });
but it returns
Undefined variable: dbclass
I know it's dynamic function name, and the syntax seems all right, I can't understand it, can anyone help me?
the envirement is win7x64, WAMP-2.5x64, Phalcon-2.0.2 x64