How to display arabic characters in web page using php and sql server

How can I display Arabic characters in web page using php and sql server? The Arabic data is stored in the database (sql server). Now I want to use php to display that data on the web page. How can I do this?

  • SQL Server CONVERT int to varchar with padding
  • Why does SQL_Latin1_General_CP1_CI_AS sort number-sign before underscore?
  • Turkish Characters aren't shown in db when i use dynamic SQL Query
  • Sql server table usage statistics
  • Update table column values based on conditional logic
  • How to translate an UPDATE WHERE IF @@ROWCOUNT == 0 query from MS SQL to MySQL?
  • Parallel execution of a stored procedure by using JMeter JDBC request and parameterization
  • Connecting to MsSql Db through Zend framework SQLSTATE (null) (severity 0)
  • Mssql 2012 with PHP & Mysql to Mssql migration
  • Django app hangs when attempting to connect to database via Apache
  • Connecting to an SQL Server Database with PHP
  • Hex Data In Linux from SQL Server 2008 Not in correct format in PHP
  • 3 Solutions collect form web for “How to display arabic characters in web page using php and sql server”

    Some SO archive may help you some ideas –

    Storing and displaying unicode string (हिन्दी) using PHP and MySQL

    Arabic text displaying in webapp without db changes

    what is the best method to build "multilingual" script in php?

    The official solution for Unicode in mssql with php

    $serverName = "MyServer";
    $connectionInfo = array( "Database"=>"AdventureWorks", "CharacterSet" => "UTF-8");
    $conn = sqlsrv_connect( $serverName, $connectionInfo);

    use this in your connection code,
    get more support on utf 8 issue on

    Note: its php/mysql based example:

    1. Before you can store Arabic content
      in a database, you need to create a
      table. The following example
      demonstrates the CREATE syntax
    2. You need to make sure your browser supports the character set. <meta
      content=”text/html; charset=UTF-8″>

    SQL Statements:

    //assumed : connection to the database is open
    mysql_query("SET CHARACTER SET utf8");
    mysql_query("SET NAMES 'utf8'");
    // select records
    mysql_query("SELECT * FROM en_authors");
    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.