/** * * @param <string> $filename File path and name * @param <type> $used_fields array which contains the fields used in the array */ public function init_base64_array_from_file($filename, $used_fields) { $this->mode = "base64_array"; $mf = new MiniFile($filename); $this->array_data = array(); $input_array = $mf->getArray(); $outk = 0; foreach ($input_array as $id => $line) { $output_array = array($id); $k = 1; foreach ($line as $column_key => $column_value) { if (in_array($column_key, $used_fields)) { $output_array[$k] = $this->getRealValue($column_value, $column_key); $k = $k + 1; } } $this->array_data[$outk] = $output_array; $outk = $outk + 1; } }