On Jan 18, 2008 5:24 PM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> If you are trying to keep the names and orders in "parallel" you need
> to do something not unlike:
>
> while (list($key, $name) = each($names)){
> $order = $orders[$key];
> $query = "update whatever set order = $order where name = '$name'";
> }
just as a mention; spl has a DualIterator class that would be perfect for
this
situation. i hesitate to mention it though, since ive not found it in any
php
version. its there in the doc, but not in actual php; what a shame.
http://www.php.net/~helly/php/ext/spl/classDualIterator.html
i can only expect well see it in a subsequent version; that there is a
reason
its not yet made it..
-nathan