diff options
author | Fbenas <philbeansburton@gmail.com> | 2015-12-05 19:53:57 +0000 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2015-12-05 19:53:57 +0000 |
commit | 612c2caeed437709d7af74dfd5efe3178dfe9ae4 (patch) | |
tree | 94f4b97eb56932186a26ce2386279fb72107deae | |
parent | 56380864115d6df864edf80e43492bf890a75521 (diff) |
Removed multiline output.
-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(); |