I have a project in mind, in which I would like to create a database with the name of variables, and in case it would be checked to see if the DB was already created, it would look something like this:
if ($pdo=new PDO ("mysql:host=localhost;dbname=$var","root",""))=sucess
{
"não cria BD"
}else{
CREATE DATABASE $var
}
Is this possible?
OBS : I do not really need to do this but it would be much more organized if I could.