load->model('logbook_model'); $log_calls = $this->logbook_model->get_callsigns($call); if($log_calls != "") { echo $log_calls ." "; } // SCP results from master scp db $file = 'updates/masterscp.txt'; $lines = file($file, FILE_IGNORE_NEW_LINES); $input = preg_quote($call, '~'); $result = preg_grep('~' . $input . '~', $lines, 0); foreach ($result as &$value) { echo " ".$value. " "; } } }