bonjour,
voici mon code:
(je voudrais faire afficher les enregistrements d'une base mysql mais avec des accents au lieu du symbole "�".
le message d'erreur qui m'est renvoyé est le suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 if (!$recordSet) { print $conn->ErrorMsg(); } else { while (!$recordSet->EOF) { $tpl_index[] = $recordSet->fields[0] ; $tpl_texte[] = $recordSet->fields[1] ; (ici l.60) $tpl_texte_accentue[]=htmlentities($tpl_texte[],ENT_COMPAT,ISO-8859-15); $tpl_prix[] = $recordSet->fields[2] ; $recordSet->MoveNext(); } } $recordSet->Close(); # optionnel $conn->Close(); # optionnel $smarty->assign("tpl_index", $tpl_index); $smarty->assign("tpl_texte_accentue", $tpl_texte_accentue); $smarty->assign("tpl_prix", $tpl_prix); $smarty->display("commander.tpl");
Fatal error: Cannot use [] for reading in C:\Web\Site\modules\gesstock\commander.php on line 60
la ligne 60 est celle où il y a le htmlentities.
merci pour votre aide.
Partager