Henrik Hansen wrote:
we****@ispace.co.za writes:
Can i send an array from one php script to another? If so, how?
Thanks Wes
Serialize the array or send it via a html form or use a session
variable: eks,
$_SESSION["myarray"] = serialize($myarray);
Then on the dest. page you can use $myarray =
unserialize($_SESSION["myarray"]);
Just one addition:
Henrik's examples are OK, but in case of Session, you do not have to
serialize, this will be done by the sessionhandler before storing.
In case of POST of GET: Yes please: Serialize AND do urlencoding to be sure
all characters are transmitted safely.
For testing, be sure you add some newlines and ' and " and & into the
information stored in the arrays, to check if they all get transmitted
right.
Regards,
Erwin Moller