RE: [PHP] Re: while loop on an array

2002-01-24 Thread Rick Emery
You don't need to know when you hit the end. Rather, simply remove the last || after the completion of the loop. while (list($new_qID,$new_aID) = each ($new_answers)) { $sql .= "qID=\"$new_qID || \""; } $sql .= substr( $sql, 0, -3) .") AND uID = \"$uID\""; -Original Message--

[PHP] Re: while loop on an array

2002-01-24 Thread Mike Frazer
There's a rather easy way to process arrays with while loops (I saw it used loosely in some of the other replies). while ($i < sizeof($array)) { ... actions ... $i++; } Hopefully you can tailor that to suit your needs. Mike Frazer "Joe Rice" <[EMAIL PROTECTED]> wrote in message news: