Łączenie tablic w php


(northwest) #1

Witam serdecznie,

Mam 3 tablice:

$testt1 = array(

    "thumb" => "thumb1",

    "small" => "small1",

    "big" => "big1"

);

$testt2 = array(

    "thumb" => "thumb2",

    "small" => "small2",

    "big" => "big2"

);

$testt3 = array(

    "thumb" => "thumb3",

    "small" => "small3",

    "big" => "big3"

);

i chciałbym je połączyć w jedną, aby uzyskać taki efekt:

Array

(

    [0] => Array

        (

            [thumb] => thumb1

            [small] => small1

            [big] => big1

        )


    [1] => Array

        (

            [thumb] => thumb2

            [small] => small2

            [big] => big2

        )


    [2] => Array

        (

            [thumb] => thumb3

            [small] => small3

            [big] => big3

        )


)

Wie ktoś może jak to zrobić?

Z góry dziękuje za pomoc,

Northwest


(mario@) #2

np.

$ser[] = $testt1;

$ser[] = $testt2;

$ser[] = $testt3;


print_r($ser);

(ra-v) #3

lub prościej

$ser = array($testt1,$testt2,$testt3);