0
<?php class dbConnect{
public function __construct() {
 global $pdo;
  try{
  $pdo = new PDO('mysql:host=localhost;dbname=quran','root','');
  } catch(PDOException $e){
   exit('Database error');
  }
}
} class get_data{  function __construct(){
$connect = new dbConnect(); } public function get_sura_list() {
  global $pdo;
  $query = $pdo->prepare("SELECT * FROM sura ORDER BY sura_no");
  $query->execute();
  return $query->fetchALL(PDO::FETCH_ASSOC);
} }  ?><html><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body><?php $all_sura_list = new get_data();$sura_list = $all_sura_list-> get_sura_list(); foreach($sura_list as $sura){       echo $sura['sura_no'];
   echo '-';
   $sura_name = rawurldecode($sura['sura_name']);
   echo $sura_name;
   echo '-';
   echo $sura['total_ayat'];
   echo '<br />';   } ?> </body></html>

Using This Script I'm trying to listing data from my database. non-English Charecters are showing Like this "???????".

I have some non-english charecter in my Database like this "ফাতিহা". Using this script they are showing like this '??????'.

I Used This code in HTML Head but nothing happend.

How Can I show thoes non-english words properly?

Niamul Hasan
  • 83
  • 11

0 Answers0