Answer the question
In order to leave comments, you need to log in
How to deal with php warning about using utf-8?
When using
php, it swears at the utf-8 constant, saying that support will stop in the next versionjson_encode($array, utf-8);
Warning: Use of undefined constant utf - assumed 'utf' (this will throw an Error in a future version of PHP)
Answer the question
In order to leave comments, you need to log in
Options are passed as the second parameter. So I have the same question as php, what does the string "utf-8" do there, besides not being escaped?
Docks: php.net/manual/ru/function.json-encode.php
List of available constants: php.net/manual/ru/json.constants.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question