Think of it as a poor mans template system. I want to store my values into a data array and then continue processing the view on another page. What PHP command would I use to accommodate this?
+1
A:
You can include
the second file and the second file will have access to all data.
shamittomar
2010-08-26 17:49:18
A:
All you need to do is set your array, and then include the page that will display it. Your included page will have access to the value(s) of $myArray.
Main Page
<?php
$myArray= Array(1, 2, 3);
include('ArrayDisplayPage.php');
?>
ArrayDisplayPage.php
<?php
var_dump($myArray);
?>
Dutchie432
2010-08-26 17:50:40