I want to pass an array to another page, then use elements in that array to make JSON, and then echo it out for the first page to access it.
Right now I can send the array to the other page, I then format it how I want, I echo it out for the first page to get, but then when I try to echo fetch_get_contents of the url I'm echoing the info on, it all of a sudden breaks the $_SESSION variable.
This is in my first file
$_SESSION['map'] = $rowContentArray;
$url2 = "http:....php";
in my second file I can get the array fine and I do everything I want with it I echo out the info I want from my other page, then when i try to access the info on the first page again, it breaks
just by adding this last line
$_SESSION['map'] = $rowContentArray;
$url2 = "http:.....php";
echo file_get_contents($url2, true);
I get the error that the index i'm using to access the array in the $_SESSION variable is undefined in my second file
$map = $_SESSION['map'];
error:
Notice: Undefined index: map
On the first file, I can echo out any random string after the session stuff and everything still works..but when i try to echo the url contents it breaks.
I am very confused as to what could be causing the session variable to be lost.
Thank you in advance for the help.