Hướng dẫn php utf8_decode question mark
I have this simple PHP-script, which searches a mySQL database and outputs the result to the user. I used to use Show To clarify some things, I have:
Now, the problem arises when I retrieve data from the database with characters like I've tried the following, and they've solved my problem:
I know that I've found multiple solutions, but I just don't know why it wont work without them? And is it bad practice to use (PHP 4, PHP 5, PHP 7, PHP 8) utf8_decode — Converts a string from UTF-8 to ISO-8859-1, replacing invalid or unrepresentable characters Warning This function has been DEPRECATED as of PHP 8.2.0. Relying on this function is highly discouraged. Descriptionutf8_decode(string
Parametersstring A UTF-8 encoded string. Return Values Returns the ISO-8859-1 translation of Changelog
ExamplesExample #1 Basic examples
The above example will output: 5a6feb string(1) "?" string(1) "?" See Also
Aidan Kehoe 18 years ago
deceze at gmail dot com ¶ 11 years ago
info at vanylla dot it ¶ 13 years ago
gabriel arobase gabsoftware dot com ¶ 11 years ago
christoffer ¶ 9 years ago
lukasz dot mlodzik at gmail dot com ¶ 14 years ago
Aleksandr ¶ 5 years ago
sashott at gmail dot com ¶ 7 years ago
kode68 ¶ 6 years ago
visus at portsonline dot net ¶ 15 years ago
$i < $len) sam ¶ 15 years ago
okx dot oliver dot koenig at gmail dot com ¶ 7 years ago
Blackbit ¶ 14 years ago
$string;
ludvig dot ericson at gmail dot com ¶ 15 years ago
MARC13 ¶ 15 years ago
alexlevin at kvadro dot net ¶ 15 years ago
paul.hayes at entropedia.co.uk ¶ 15 years ago
php-net at ---NOSPAM---lc dot yi dot org ¶ 16 years ago
rasmus at flajm dot se ¶ 17 years ago
thierry.bo # netcourrier point com ¶ 17 years ago
punchivan at gmail dot com ¶ 14 years ago
luka8088 at gmail dot com ¶ 15 years ago
j dot dittmer at portrix dot net ¶ 17 years ago
haugas at gmail dot com ¶ 14 years ago
$i = 0; $i < $count-1 ; $i++) Ajgor ¶ 15 years ago
yannikh at gmeil dot com ¶ 16 years ago
gto at interia dot pl ¶ 18 years ago
Sadi ¶ 15 years ago
2ge at NO2geSPAM dot us ¶ 16 years ago
utf2ascii($string) {
fhoech ¶ 17 years ago
tobias at code-x dot de ¶ 15 years ago
fhoech ¶ 17 years ago
|