Re: [PHP] need loop help

2006-10-05 Thread Richard Lynch
Change ${$fields[$j]} to $_POST[$fields[$j]] everywhere? Or you could make the whole thing a lot more readable: foreach($fields as $field){ $data[$field] = isset($_POST['field']) && $_POST['field'] == 'on' ? 1 : 0; } On Tue, October 3, 2006 4:48 pm, Charles Kline wrote: > hi all. > > i am tryi

Re: [PHP] need loop help

2006-10-03 Thread John Wells
On 10/3/06, Charles Kline <[EMAIL PROTECTED]> wrote: hi all. i am trying to modify some old code and struggling a bit with this one: // returns an array of the names in the form post $fields = $_SESSION['case']->getComplaintKeys(); First of all this is news to me, I'm not sure how it is that

[PHP] need loop help

2006-10-03 Thread Charles Kline
hi all. i am trying to modify some old code and struggling a bit with this one: // returns an array of the names in the form post $fields = $_SESSION['case']->getComplaintKeys(); // here is the array returned Array ( [0] => eligibility [1] => payment [2] => service [3] => document [4] => lice