mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-14 01:33:58 +02:00
Fix comment error around UTF-8 and PDO
This commit is contained in:
@@ -86,7 +86,7 @@ $string = mb_substr($string, 0, 15);
|
|||||||
|
|
||||||
// Connect to a database to store the transformed string
|
// Connect to a database to store the transformed string
|
||||||
// See the PDO example in this document for more information
|
// See the PDO example in this document for more information
|
||||||
// Note the `set names utf8mb4` commmand!
|
// Note the `charset=utf8mb4` in the Data Source Name (DSN)
|
||||||
$link = new PDO(
|
$link = new PDO(
|
||||||
'mysql:host=your-hostname;dbname=your-db;charset=utf8mb4',
|
'mysql:host=your-hostname;dbname=your-db;charset=utf8mb4',
|
||||||
'your-username',
|
'your-username',
|
||||||
|
Reference in New Issue
Block a user