SyntaxFix
Write A Post
Hire A Developer
Questions
I found the answer to this problem here
Just do
mb_convert_encoding($data['name'], 'UTF-8', 'UTF-8');