mysql - PHP define() function not work with unicode utf-8 characters -
I defined php (); I work with the
function and add value to MySQL database like this:
$ options = DataAccess :: FETCHLOAD ("Select Sign FROM" option. "Where 1" ); Define ('_ in_', $ option ['0'] ['mark']); Echo _SIGN_;
is now in ouuput:
??????????????????????? Without defining
:
$ option ['0'] ['sign'] echo;
Output worked:
تواصل معنا
all mysql results utf-8
Ouput, but when I define my result, how do I fix it in utf-8
not
?
This should work for you:
In addition to this, *. Php
file?
& lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Trial & lt; / Title & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php $ option ['0'] ['sign'] = "تواصل معنا"; Define ('_ in_', $ option ['0'] ['mark']); Echo _SIGN_; ? & Gt; & Lt; / Body & gt; & Lt; / Html & gt;
Update after comment:
$ options = DataAccess :: FETCHLOAD ("Select signature" option. "Where 1"); First $ option ['0'] ['sign']; // You said that here you define the output "تواصل معنا" ('_ sign_', $ options ['0'] ['sign']); Echo _SIGN_; // and the output is "????????????????????"
But it works for you:
define ('_ SIGN_', 'تواصل معنا'); Echo _SIGN_; // And here is the output "تواصل معنا"
This can not be done! It's not locigal!
Comments
Post a Comment