17.12.2017, 14:55
Well.. I don't think someone of you read the error message.
An multi-dimensional arrays must be fully initialized. That's means, if you declare somes values in one of your array's dimension ; you need to set others dimensions's size explicitly and every value from any dimensions.
In other words (taken from this website):
If an array with more than one dimension is initialized at its declaration, then there must be equally many literal vectors/sub- arrays at the right of the equal sign (“=”) as specified for the major dimension(s) of the array.
Example of a code produce error:
Solution:
An multi-dimensional arrays must be fully initialized. That's means, if you declare somes values in one of your array's dimension ; you need to set others dimensions's size explicitly and every value from any dimensions.
In other words (taken from this website):
If an array with more than one dimension is initialized at its declaration, then there must be equally many literal vectors/sub- arrays at the right of the equal sign (“=”) as specified for the major dimension(s) of the array.
Example of a code produce error:
PHP Code:
new Array[][][] =
{
{
{0},
{1}
},
{
{0}
}
};
PHP Code:
new Array[][][] =
{
{
{0},
{1}
},
{
{0},
{1}
}
};