Hi

I would like to pass three arrays, two of them are two dimensional arrays,
to another page (or to the same page just submit to itself) using hidden
field and the function serialize.

(this is a two dimensional array)
page-1
 $s_array1 = serialize($array1);

<INPUT type="HIDDEN" name="h_array1" value="<?php echo urlencode($s_array1);
?>">

page-2
 $array1= unserialize(urldecode(stripslashes($_POST['h_array1'])));

it seems to work except there appears to be one NULL record added to the
beginning of the array.
it affects the following :-
count(array_keys($array1) ) returns actual_no_of_keys + 1
foreach () echo with one NULL record at the beginning
reset($array1) erase the array completely !!

and it doesn't help to use rawurl(en|de)code, and with | without
stripslashes!

PLEASE HELP! if you can resolve this, or has a better ways to pass arrays
between pages.

Many Thanks
/dl



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to