Jump to content

the limits of my comprehension


radioactivelizard

Recommended Posts

what I've done and since undone, because it wasn't working and cant show you because i use notepad. im trying to add values in arrays together it happens the wrong way tho instayed of adding the 2 arrays togeather it adds each value of the one array togeather like this

[0] =>27 [1] =>9 [2] =>9

[0] =>3 [1] =>1 [2] =>1

when what i really want is

[0] =>10 [1] =>10 [2] =>10

[0] =>1 [1] =>1 [2] =>1

(the ones are added to the nines)

 

thank you for your time :)

$i=1;
$g=1;

foreach($Mdarray as $MD1)
{
foreach($MD1 as $MD2)
{
$MD3[$g][$i] = explode("|" , $MD2);
$i++;
}
$i=1;
$g++;
}
print_r($MD3); 

 

 

 

 

 

 

print_r($MD3) returns  (just alot of numbers nothing of real significant)

(

    [1] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [2] => Array

        (

            [1] => Array

                (

                    [0] => 1

                    [1] => 1

                    [2] => 1

                    [3] => 1

                    [4] => 1

                    [5] => 1

                    [6] => 1

                    [7] => 1

                    [8] => 1

                    [9] => 1

                    [10] => 1

                    [11] => 1

                    [12] => 1

                    [13] => 1

                )

 

            [2] => Array

                (

                    [0] => 1

                    [1] => 1

                    [2] => 1

                    [3] => 1

                    [4] => 1

                    [5] => 1

                    [6] => 1

                    [7] => 1

                    [8] => 1

                    [9] => 1

                    [10] => 1

                    [11] => 1

                    [12] => 1

                    [13] => 1

                )

 

        )

 

    [3] => Array

        (

            [1] => Array

                (

                    [0] => 100

                    [1] => 100

                    [2] => 100

                    [3] => 100

                    [4] => 100

                    [5] => 100

                    [6] => 100

                    [7] => 100

                    [8] => 100

                    [9] => 100

                    [10] => 100

                    [11] => 100

                    [12] => 100

                    [13] => 100

                )

 

            [2] => Array

                (

                    [0] => 100

                    [1] => 100

                    [2] => 100

                    [3] => 100

                    [4] => 100

                    [5] => 100

                    [6] => 100

                    [7] => 100

                    [8] => 100

                    [9] => 100

                    [10] => 100

                    [11] => 100

                    [12] => 100

                    [13] => 100

                )

 

        )

 

    [4] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [5] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [6] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [7] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [8] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [9] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [10] => Array

        (

            [1] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

            [2] => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

    [11] => Array

        (

            [1] => Array

                (

                    [0] => 1

                    [1] => 1

                    [2] => 1

                    [3] => 1

                    [4] => 1

                    [5] => 1

                    [6] => 1

                    [7] => 1

                    [8] => 1

                    [9] => 1

                    [10] => 1

                    [11] => 1

                    [12] => 1

                    [13] => 1

                )

 

            [2] => Array

                (

                    [0] => 9

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 0

                    [6] => 0

                    [7] => 0

                    [8] => 0

                    [9] => 0

                    [10] => 0

                    [11] => 0

                    [12] => 0

                    [13] => 0

                )

 

        )

 

)

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.