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).
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).
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);
Inclusion so:
<?php include("b.php"); include("c.php"); ?>
And what is in them for that content?Source: https://ru.stackoverflow.com/questions/21325/
All Articles