summaryrefslogtreecommitdiff
path: root/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'search.php')
-rw-r--r--search.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/search.php b/search.php
index 370c25e..c4db438 100644
--- a/search.php
+++ b/search.php
@@ -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();