mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-16 02:34:00 +02:00
Fix examples
If there is no namespace declared in the example, the backslash before the class name is not necessary and can be confusing
This commit is contained in:
@@ -84,13 +84,13 @@ $string = mb_substr($string, 0, 15);
|
||||
// Connect to a database to store the transformed string
|
||||
// See the PDO example in this document for more information
|
||||
// Note the `set names utf8mb4` commmand!
|
||||
$link = new \PDO(
|
||||
$link = new PDO(
|
||||
'mysql:host=your-hostname;dbname=your-db;charset=utf8mb4',
|
||||
'your-username',
|
||||
'your-password',
|
||||
array(
|
||||
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
|
||||
\PDO::ATTR_PERSISTENT => false
|
||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||
PDO::ATTR_PERSISTENT => false
|
||||
)
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user