is it considered 'bad practice' to create an fucntion like so:
// $arr_member_fields['first_name'] = $_POST['first_name'];
// $arr_member_fields['last_name'] = $_POST['first_name'];
// $arr_member_fields['email'] = $_POST['email'];
// $arr_member_fields['dob'] = $_POST['dob'];
// $arr_member_fields['gender'] = $_POST['gender'];
function update_member($int_member_id $arr_member_fields)
{
//some code
}
or should a create a function with no array and just use variables instead -- like so:
function update_member($int_member_id, $str_first_name, $str_last_name, str_email, $str_dob, $chr_gender)
{
//some code
}
the reason why i prefer the first method (the one with the array) is that i always have the option to loop through the array for database insertion/updating purposes.
very curious to know other peoples inputs on this.