Wednesday, 14 August 2013

Create a New Global Variable?

Create a New Global Variable?

Theres many pre-set globals within PHP, Theres $_SESSION, $_REQUEST,
$_POST,$_GET,$_COOKIE... So on and so fourth, they each have different
usages, but i'm wondering if it's possible to Create another global array
which retains it's values after setting.. Example:
index.php:
include "Test.php";
print_r($Array);
Test.php
$Array = array();
Set.php:
include "Test.php";
$Array[] = "Test";
Procedure:
User navigates to Set.php -> set.php adds values to the array set on
Test.php -> User Navigates to index.php & Values are retained.
As there is nothing manipulating the Array on test.php, the values are
cleared. Is there any way to make this array retain it's values after
refresh and no manipulations?

No comments:

Post a Comment