Je rencontre un gros problème lorsque j'appel une page php via ajax. En effet toute fonction qui comporte une manipulation d'array ne fonctionne pas quand elle est appelée grâce à ajax. J'ai vu que ce problème est connu et j'ai trouvé beaucoup de topic parlant de json_encode... (que je ne comprend pas forcément très bien). Mon problème est qu'à la différence de ces topics, je ne cherche pas à récupérer le return d'une fonction qui renvoi un tableau (et donc récupéré un tableau), moi je cherche à récupérer une page html et UNIQUEMENT du html qui à été crée VIA des fonction php utilisant des array. Et des fonctions qui manipulent des array j'en ai un bon paquet du type :
Code : Tout sélectionner
if(preg_match_all("/\^\S+/",$math,$match_math))
{
foreach ($match_math as $v1_math) {
foreach ($v1_math as $c_math=>$v2_math) {
$sup = str_replace('^', '', $v2_math);
$replacement_math = "<SUP>".$sup."</SUP>";
$math = str_replace($v2_math, $replacement_math, $math);
}
}
}