Does someone have an idea please? My problem is that the result that my query SQL which is in Arabic is displayed with characters like that ع٠"ÙŠÙ ‡ اÙ". While I do all:
- for my database : cp1256_general_ci
- column of table : utf_bin8
- connect to data base :
// CONNEXION BDD $pdo = new PDO('mysql:host=localhost;dbname=jeu', 'root', '', array( PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING, PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'' )); <?php require_once('inc/init.inc.php'); $req= $pdo -> query("select * from proposition "); while($data=$req -> fetch(PDO::FETCH_ASSOC)){ echo' <form action="" method="post">'; echo $data['question'].'<br />'; echo $data['id_propo'].'<br />'; echo '<input type="radio" name="rep" value='.$data["rep1"].'+'.$data['id_propo'].' />'.$data['rep1'].'<br />'; echo '<input type="radio" name="rep" value='.$data["rep2"].'+'.$data['id_propo'].' />'.$data['rep2'].'<br />'; echo '<input type="radio" name="rep" value='.$data["rep3"].'+'.$data['id_propo'].' />'.$data['rep3'].'<br />'; echo '<input type="radio" name="rep" value='.$data["rep4"].'+'.$data['id_propo'].' />'.$data['rep4'].'<br /><br />'; } echo '</form>'; ?>