Notice: Undefined offset: PHP comment s'en débarrasser
Résolu
gyoy
Messages postés
5
Statut
Membre
-
gyoy Messages postés 5 Statut Membre -
gyoy Messages postés 5 Statut Membre -
Salut ,je n'arrive plus à se débarrasser de ce message d'erreurs dans mon code malgré que j'ai utilisé le if(isset ... et errors reporting veuillez m'aidez s'il vous plait
A voir également:
- Notice: undefined offset: 3
- Notice gratuite - Guide
- :3 emoji ✓ - Forum Loisirs / Divertissements
- Ai suite 3 - Télécharger - Optimisation
- Montre mingrui notice - Forum Accessoires & objets connectés
- Notice telecommande universelle grundig - Forum Téléviseurs
A remplacer à mon avis par :
<?php class matrice{ private $ligne; private $colonne; private $nom; private $M=array(); public function __construct() { for($i=0;$i<$this->ligne;$i++) { for($j=0;$j<$this->colonne;$j++) { $this->M[$i][$j]=0; } } } public function setname_dims($l,$c,$n){ $this->ligne=$l; $this->colonne=$c; $this->nom=$n; } public function saisie() { echo"<form method='POST' action='Classe_Matrice.php'>"; echo"saisir la matrice $this->nom :::\n"; echo"<table >"; for($i=0;$i<$this->ligne;$i++) { echo "<tr>"; for($j=0;$j<$this->colonne;$j++) { echo "<td>"; echo"<input type='text' name=".$this->nom.$i.$j."> </td>"; } echo"</tr>";} for($i=0;$i<$this->ligne;$i++) { for($j=0;$j<$this->colonne;$j++) { $this->M[$i][$j]=$_POST[$this->nom$i$j]; } } echo "</table>";} public function afficher() { echo"<table width='200' border='1'>"; for($i=0;$i<$this->ligne;$i++) { echo "<tr>"; for($j=0;$j<$this->colonne;$j++) { echo "<td>".$this->M[$i][$j]."</td>"; } echo "</tr>"; } echo "</table>"; } ?>