Ben Miller wrote:
edit
I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values [the
whole array and all of it's values] from
page to page and/or store in a db.
<? echo ("<html><head><title>Array Example</title></head><body>");
echo ("<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">");
for ($i=0; $i<count($array_variable); $i++){
echo ("<input name=\"array_variable[]\" type=\"hidden\" value=\"".$array_variable[$i]."\">");
}
##-- Add to the array? echo ("<input name=\"array_variable[]\" type=\"text\" value=\"\">"); echo ("<input name=\"submit\" type=\"submit\" value=\"Add to the Array\">"); echo ("</form>");
echo ("<br>"); echo ("Current Array Elements:"); for ($i=0; $i<count($array_variable); $i++){ echo ("<BR>".$array_variable[$i]); }
echo ("</body></html>"); ?>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php