Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 225 Bytes

using-utf8mb4-in-php-pdo.md

File metadata and controls

12 lines (7 loc) · 225 Bytes

Using utf8mb4 in PHP PDO

$pdo = new PDO('mysql:host=localhost;dbname=test;charset=utf8mb4', 'usr', 'pwd');
  • new PDO - create new PDO connection
  • charset=utf8mb4 - set charset to utf8mb4

group: charset