Re: Arrays
| From: | James E Hicks III | Date: | Thu, 11 Nov 2004 15:41:52 +0000 |
| Subject: | Re: Arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201776@lists.php.net to get a copy of this message | ||
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>"); ?>