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--
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:
2 matches
Mail list logo