I want to print (SELECT) statement by php . I have this code but it is not working with deferent language ( like Arabic ) ,
<?php
include "connect.php" ;
mysql_query("set character_set_server='utf8'");
mysql_query("set names 'utf8'");
$sql = "SELECT * FROM appointment";
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "<br>";
echo $row['id_file'];
echo "<br>";
echo $row['clinic'];
echo "<br>";
echo $row['date1'];
echo "<br>";
echo $row['time'];
echo "<br> " ;
}
?>
You need to:
add this after the opening php tag
header('Content-Type: text/html; charset=utf-8');