The array structure of array output is as follows $ a = array ('A', 'B', 'C'); $ a [0] = array ('A ', 'AB', 'AC', 'AD'); $ a [1] = array ('A', 'AB', 'AC', 'AD '); echo & nbsp; $ a [2]; the output is normal. the output is c & nbsp; because $ a [2] does not define the array output.
The array structure is as follows:
$ A = array ('A', 'B', 'C ');
$ A [0] = array ('A', 'AB', 'AC', 'AD ');
$ A [1] = array ('A', 'AB', 'AC', 'AD ');
Echo $ a [2];
The output is normal. The Output c is because $ a [2] does not have an array defined.
How to input a in one dimension.
Echo $ a [0];
------ Solution --------------------
There is no a in one dimension.
He has been overwritten by $ a [0] = array ('A', 'AB', 'AC', 'AD ');
You can see print_r ($ );
------ Solution --------------------
Reference:
There is no a in one dimension.
He has been overwritten by $ a [0] = array ('A', 'AB', 'AC', 'AD ');
You can see print_r ($ );
Positive solution
------ Solution --------------------
$ A = array ('A', 'B', 'C ');
$ A [0] = array ('A', 'AB', 'AC', 'AD ');
After Execution
$ A = array (
Array ('A', 'AB', 'AC', 'AD '),
'B ',
'C'
)
$ A [1] = array ('A', 'AB', 'AC', 'AD ');
After Execution
$ A = array (
Array ('A', 'AB', 'AC', 'AD '),
Array ('A', 'AB', 'AC', 'AD '),
'C'
)
Therefore:
$ A [0] = array ('A', 'AB', 'AC', 'AD ')
$ A [1] = array ('A', 'AB', 'AC', 'AD ')
$ A [2] = c