Maybe a silly question, but:
can I pass an array in the Include statement?
I have the script A.php, where I define an array, and then the statement
Code: Select all
include 'B.php';How can be done?
Thanks in advance.
Moderator: General Moderators
Code: Select all
include 'B.php';Code: Select all
$array = array();
function setarray() {
$array[] = 1;
$array[] = 2;
$array[] = 3;
}
setarray();
include "B.php";