php host 127 user root pass pdo new PDO mysql host host dbname db char

1
2
3
4
5
6
<?php
$host = '127.0.0.1';
$user = 'root';
$pass = '';
$pdo = new PDO('mysql:host=$host;dbname=$db;charset=UTF-8', $user, $pass);
?>