I guess I was just "talking the problem out." :-)Writing that post helped me think of iterating through $_POST. Now I've come to this problem:
Before I did this and it works: while ($row=@mysql_fetch_array($result)) { if ($fieldname1) $output.="$row[fieldname1]\t"; if ($fieldname2) $output.="$row[fieldname2]\t"; } Trying to tighten up as discussed with this, but doesn't work: while ($row=@mysql_fetch_array($result)) { foreach ($_POST as $key => $data) if ($data) {$output.="$row[" . $key . "]\t"; } // foreach } // end while $rowThe above throws a "Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in...." error.
This substitution: if ($data) {$output.="$row[$key]\t";eliminates the aforementioned error, but does not produce the desired results.
On Jun 7, 2006, at 8:26 AM, chris smith wrote:
If in doubt give something a try. :)
Attachment:
smime.p7s
Description: S/MIME cryptographic signature