How to insert two other b.php and c.php into one a.php.

From their content to get arrays, which can then be merged into one array (array_merge).

    2 answers 2

    a.php:

    $array = array_merge( include ('b.php'), include ('c.php') ); 

    b.php:

     return array('a' => 1, 'b' => 2, 'c' => 3); 

    c.php:

     return array('d' => 4, 'e' => 5, 'f' => 6); 
    • Thanks, did not know what to do array_merge (include ('b.php'), include ('c.php')); I'll know! - Goldy

    Inclusion so:

     <?php include("b.php"); include("c.php"); ?> 
    And what is in them for that content?

    • values ​​are ordinary. And about the include () I knew. I do not know how to merge the received two into one array) - Goldy