Re: Re: Simple Array question (conclusion)
| From: | John W. Holmes | Date: | Tue, 29 Jul 2003 23:36:18 +0000 |
| Subject: | Re: Re: Simple Array question (conclusion) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157469@lists.php.net to get a copy of this message | ||
Ryan A wrote:
I GOT IT!!!! this is where the data was coming from: <input name="id[sh123]" type="hidden" id="id[sh123]" value="32"> <input name="id[sh1sd]" type="hidden" id="id[sh1sd]" value="563"> and this is where i take the values and dump it into an array/variables that i can call when and where i please: <?php $nn=0; foreach($id as $nname => $pppno) {$asdf[$nn]=$pppno; $nn++; } ?> <br><br><?php echo $asdf[0]; ?><br> <?php echo $asdf[1]; ?> I just took out some of the breaks so it will take less space but you get the idea. Thank you to everyone who tried to help, but maybe i didnt explain the problem well enough that you didnt get the answer or just didnt want to :-DSeriously? You could just replace the above with: $asdf = array_values($_POST['id']); I think you need to be cut off from the list for a while. Trial by fire, I say!! -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com