I use this code for connecting to sql in PHP:
public function ffff(){
$connection = new mysql();
$connection->connect('127.0.0.1','root','','miscfb');
}
but I want to use a variable instead of 'miscfb'
.
for example:
$db='miscfb';
and the code will be:
$connection->connect('127.0.0.1','root','',$db);
but it cannot connect to database!
How should I use variables?