I have an array of ids, and for each id, I want to include a file, and send the id to the include-file, but after the first id, the other ids are empty. Why are the other ids not passed through the include-file?
$ids = array(1, 2, 3);
foreach($ids as $id) {
$id = $id;
include_once("file.php");
echo $path . "<br />"; // comes from include-file
}
When I echo my $id in the include-file, I get '1', but the other two ids are empty?