How to solve the PHP characters garbled, Chinese characters in the library garbled problem

Source: Internet
Author: User
  1. /*
  2. The solution to the characters of the @ characters in the Library
  3. @bbs. it-home.org
  4. */
  5. Include_once ("conn.php");
  6. Include_once ("include.php");
  7. mysql_query ("Set names ' GBK '") or Die ("set word repertoires failed \ n");
  8. mysql_select_db ($db) or Die ("Connection database failed!\n");
  9. $exec = "SELECT * from $table";
  10. Echo $exec;
  11. $result = mysql_query ($exec, $conn) or Die ("query database failed \ n");
  12. echo "
  13. for ($cout =0; $cout<>
  14. {
  15. echo "City: $city";
  16. }
  17. $city = mysql_result ($result, $cout, city);
  18. $name = mysql_result ($result, $cout, name);
  19. $phone = mysql_result ($result, $cout, phone);
  20. echo "
  21. echo "Name: $name";
  22. echo "Phone: $phone";
  23. echo "
  24. echo "
  25. "; "; ";
    ";
  26. ?>
Copy Code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.