look at serialize http://us2.php.net/manual/en/function.serialize.php and in the user notes below, note that serialize doesn't remove quotes so need to base64_encode() after the serialize. base64_encode(serialize($array)) than reverse on the other end unserialize(base64_dencode($array)) > -----Original Message----- > From: news [mailto:news@xxxxxxxxxxxxx]On Behalf Of MikeA > Sent: November 22, 2004 18:50 > To: php-windows@xxxxxxxxxxxxx > Subject: Passing an Array in HTML > > > I am reading a file into an array ($data_old = > file("config.old");) and then > processing it as I receive information from the user. As we > all know, the > Internet is stateless, so I need to read back in the array > after I get my > answer. > > Array definitions are > > $data_old = array(); > $data_new = array(); > $data_count = 0; > > The output code is > > echo "<P><input type='hidden' name='data_old' value='".$data_old."'>"; > echo "<P><input type='hidden' name='data_old' value='".$data_new."'>"; > echo "<P><input type='hidden' name='data_count' > value=".$data_count.">"; > > and the input code is > > $data_old = $_REQUEST['data_old']; > $data_new = $_REQUEST['data_new']; > $data_count = $_REQUEST['data_count']; > > $data_count is working so I am assuming my problem is the way > that I am > passing the array. How can I pass an array or is it not > possible? I would > think that anything can be passed as it is just bits of data > (pun intended). > So what goes out should come in. But, for some reason, that is not > happening. > > Any help, suggestions, and guidance is appreciated. > > Mike > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php