Y
Y
YdarSvertyhi2017-03-27 13:13:34
PHP
YdarSvertyhi, 2017-03-27 13:13:34

When receiving an array in PHP from MySql, Russian characters are replaced by ?????

92eea6157c704a2d93ed719197fbe2a2.png
When writing $mysqli->query ("SET NAMES 'utf8'"); gives an error:
Fatal error: Call to a member function query() on a non-object in Z:\home\werington\www\index.php on line 7
Database encoding utf8_general_ci.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
usja, 2017-03-27
@usja

There is mysqli_set_charset php.net/manual/ru/mysqli.set-charset.php

C
coderisimo, 2017-03-27
@coderisimo

1) Do you create the object itself successfully?
$mysqli = new mysqli("localhost", "user", "pass", "bd");
2) Is the file with the code in UTF-8 encoding?
The picture is small, you can't see anything)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question