$keywords = explode(' ', $search_keywords); foreach ($keywords as $key) { $searchfilter .= " AND (jo.customer_billing_firstname LIKE '%{$key}%'"; $searchfilter .= " OR jo.customer_billing_lastname LIKE '%{$key}%')"; } } break; case 'a': $searchfilter .= " AND joi.article_number LIKE '%{$search_keywords}%'"; break; case 'o': $searchfilter .= " AND jo.order_id LIKE '%{$search_keywords}%'"; break; } } $returns = $class_jo->retrieveReturnList($jng_sp_id, $searchfilter); if (count($returns) > 0) { $orders = array(); $o = array(); $o['d2'] = 'Date'; $o['i'] = 'Return info'; $o['o'] = 'Order No'; $o['a'] = 'Article No'; $o['p'] = 'Price'; $o['q'] = 'Qty'; $orders[] = $o; $show_upload_retcon = false; foreach ($returns as $row) { $o = array(); $o['d2'] = date('d-M-y', strtotime($row['return_time'])); $o['i'] = $row['customer_name'] . ' <a href="" id="rid-' . $row['return_id'] . '" class="detail" title="View Return Detail">[more]</a>';