2
Well I’ve bonded for making the inputs
of matriz
in html
with the following code.
for($I=0; $I<5;++$I){
for($J=0;$J<3;++$J){
print" Matriz A: <input class='_InpText2' type='text' name='Matriz".[$I][$J]."' />";
}
}
for($I=0; $I<5;++$I){
for($J=0;$J<3;++$J){
echo " Matriz B: <input class='_InpText2' type='text' name='Matriz".[$I][$J]."' />";
}
}
This code above in Windows reproduces the following error:
Notice: Undefined offset: 1 in C: xampp htdocs php php Exercises-chapter03 exercise06.php on line 30
the file extension is .php
and in the Ubuntu does not display this error someone knows because?
It is because you must have "hidden" errors, try adding these two lines:
error_reporting(-1);
ini_set('display_errors', 'On');
at the front lines of the file– Miguel
But the error happens because you are treating your variables as an array, put only:
'....Matriz".$I.$J."'...
– Miguel
How is the structure of this
print
??– William Aparecido Brandino