signatures)) { $this->signatures[]=$signature; $this->solutions[]=$chiffres; } } else { for ($i = count($possibilites) - 1; $i >= 0; --$i) { $newPossibilites = $possibilites; $newChiffres = $chiffres; list($firstVal) = array_splice($newPossibilites, $i, 1); array_unshift($newChiffres, $firstVal); $this->chercher($newPossibilites, $newChiffres); } } } function getSolutions() { return $this->solutions; } } $valeurs=array(); foreach (range(0,9) as $i) { if (!in_array($i,explode(',',$_POST['sans']))) $valeurs[]=$i; } $enigme2=new Logiquenigme2(); $enigme2->chercher($valeurs); foreach ($enigme2->solutions as $no => $solution) { list($F,$A,$C,$E,$D,$B,$T)=$solution; echo '

Solution n° :
'; echo "Avec F = $F, "; echo "A = $A, "; echo "C = $C, "; echo "E = $E, "; echo "D = $D, "; echo "B = $B et "; echo "T = $T,
ça marche, on a bien ".$F.$A.$C.$E." + $A + ".$F.$A.$C.$E." = ".$D.$E.$B.$A.$T."

"; }