Hi there,
I just need to fill in an empty array : $file_info['threads']['selected_threads'] with data from another array, the result should look like this :
1. Array ( [19] => Array ( [enable] => Y )[47] => Array ( [enable] => Y ) [48] => Array ( [enable] => Y ) [52] => Array ( [enable] => Y ) [43] => Array ( [enable] => Y )
)
This is my attempt to do so, but I still get an empty array for some reason:
} else { //fn_set_notification('E', __('error'), __('ss_order_threads_no_selected_threads')); $threads = db_get_array("SELECT * FROM ?:ss_order_threads_links WHERE order_id = ?i", $order_info['order_id']); fn_print_r($threads); foreach ($threads as $key => $thread) { $file_info['threads']['selected_threads'] = array(); foreach ($file_info['threads']['selected_threads'] as $key =>$selected){ $array[$key]['id'] = $selected->$thread['thread_id']; $res = array("enable" => "Y"); $array[$key]['value'] = $selected-> $res; } } print('Check
'); fn_print_r($file_info['threads']['selected_threads']); } } // end function fn_ss_order_threads_generate_file
Would be great if someone can give me a tip here.
Thanks.