On Fri, 19 Jan 2001, Richard Lynch wrote:

> > <?
> > for ($i=0 ; $i < 4 ; $i++)
> > {
> >     file://do something
> >
> >     for ($k=0 ; $k < 3 ; $k++)
> >    {
> >         print "<input type=\"checkbox\" name=\"checkans[$i][$k]\"
> > value=\"".$K."\" >"; file://this is working
> >         print "<input type=\"file\" name=\"ans[$i][$k]\" >"; file://this
> is
> > not
> >    }
> > }
>
> For FORMs, files as arrays were added in later, and then 2-D arrays came
> after that.  So probably there is no patch yet for 2-D FILE inputs.
>
> You're probably receiving all the files in a 1-D array, with funky indices
> (keys):
>
> $ans['0][0'] is the first file.
> $ans['0][1'] is the second file
> etc
>
> If so, you can walk that and use explode('][', $key) to determine the
> indices you really wanted and re-construct your desired array.
>
> Something like:
> while (list($key, $value) = each($ans)){
>     $keys = explode('][', $key);
>     list($x, $y) = each($keys);
>     $realans[$x][$y] = $value;
> }
>
>
> By Day:                                |By Night:
>     Don't miss the Zend Web Store's    |   There's not enough room here...
>     Grand Opening on January 23, 2001! |   Start here:
>     http://www.zend.com                |   http://l-i-e.com/artists.htm
>

Actually, the patch went in today. Pick up the CVS tomorrow and you should be
laughing.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to