I have a problem in my application with accent. It is an application that works with the upload of files to a MySQL database from PHP and Slim Microframework. The problem occurs in that I am not shown the accent, even though everything is encoded in UTF-8 in the database. I have been reading on the internet and I have seen something that has helped me in part, but after uploading the files of the problems, and not showing the accents. I give you a piece of code to see if you can help me. It is in the PDO connection:
$this->pdo = new PDO('mysql:host=localhost;dbname=myDB','user','password',array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''));
regards