diff options
-rw-r--r-- | search.php | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -76,7 +76,7 @@ try { } // Return results - $out = ""; + $out = []; if (empty($results)) { echo "No results found\n"; } else { @@ -93,15 +93,15 @@ try { $i++; continue; } - $out .= $result . "\n"; + $out[] = $result; $i++; } if ($count > 3) { - $out .= " - results (" . $count . ")\n"; + $out[] = "results (" . $count . ")"; } } - echo $out; + echo implode(" - ", $out); } catch (Exception $e) { echo $e->getMessage() . "\n";die(); |