error 052: multi-dimensional arrays must be fully initialized
#5

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:
PHP Code:
new Array[][][] =
{
    {
        {
0},
        {
1}
    },
    {
        {
0}
    }
}; 
Solution:
PHP Code:
new Array[][][] =
{
    {
        {
0},
        {
1}
    },
    {
        {
0},
        {
1}
    }
}; 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)