Hallo zusammen,
ich möchte gerne ein Array in einer Session übergeben.
Von "Script 1" zu "Script 2".
Leider kommt nicht's in Script 2 an!
register_globals ist auf "OFF"
PHP Version 5.2.6-1+lenny3
Hat jemand eine Idee was ich falsch mache?
MfG
ich möchte gerne ein Array in einer Session übergeben.
Von "Script 1" zu "Script 2".
Leider kommt nicht's in Script 2 an!
register_globals ist auf "OFF"
PHP Version 5.2.6-1+lenny3
PHP-Code:
error_reporting(E_ALL);
// Script 1
session_start();
$test = array();
$test['name'][0]= 'Andi';
$test['name'][1]= 'Tim';
$test['name'][2]= 'Heinz';
$_SESSION['arraydata'] = $test;
PHP-Code:
error_reporting(E_ALL);
// Script 2
session_start();
$test = array();
$test = $_SESSION['arraydata'];
echo "<pre>";
print_r($test);
echo "</pre>";
MfG
Kommentar