Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to fix HTTP header to UTF-8 using PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 274
    Comment on it

    Hello Reader's If you want to set the HTTP header to UTF-8 then html will itself allows you to convert it. But if you want it to be wrap by using PHP then you can use the code below:-

    You just have to use header to modify the HTTP header:

    header('Content-Type: text/html; charset=utf-8');
    

    But remember,Do not forget to call this function before any output has been dispatch to the client. Otherwise the header has been dispatch too and you obviously will not be able to change it any more.

    And you can also set it as:-

    meta charset="utf-8"
    header php.(before any output of the HTML):
    header('Content-Type: text/html; charset=utf-8')
    table-rows-charset(for each row):
    utf8_unicode_ci
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: