title: newline in json_encode() output
body: <p>I am building an output array like so</p>
  
  <pre><code>            if (count($errors)) {
                  $success = 'false'; 
                  $output['json_msg'] = "Please try your submission again.";
                  $output['errors'] = $errors;
              } else {
                  $success = 'true';  
                  $output['json_msg'] = "Thanks for Becoming a NOLA Insider!";
              }
  
              $output['success'] = $success;
  
              header('Content-type:application/json;charset=utf-8');
              if (count($errors)) { http_response_code(500); }
              echo json_encode($output);          
              exit;
  </code></pre>
  
  <p>But when I look at the response in Chrome's Network pane of the developer tools I see what appears to be a newline in response:</p>
  
  <p><a href="https://i.stack.imgur.com/yqoHO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yqoHO.jpg" alt="developer console screenshot"></a> </p>
  
  <p>I tried wrapping json_encode() in trim() but this gave garbled output.</p>
  
  <p>How do I eliminate the carriage return?</p>