title: Proper way to echo JSON in php
body: <p>Hi i am looking for a proper way to echo json in my php api, currently this is my echo code</p>
  
  <p>I am getting this from a different class</p>
  
  <pre><code>echo '{"accountStatus":{';
  echo '"create_status_code": "400",';
  echo '"message": "Unable to create user."';
  echo '}}';
  </code></pre>
  
  <p>I am getting this from a different class</p>
  
  <pre><code>echo '{';
  echo '"status_code": "em200",';
  echo '"message": "email duplicate"';
  echo '}';
  </code></pre>
  
  <p>At the end this is what i am getting which is not valid JSON</p>
  
  <pre><code>{ 
  "status_code":"em200",
  "message":"email duplicate"
  }{  
  "accountStatus":{  
  "create_status_code":"400",
  "message":"Unable to create user."
  }
  }
  </code></pre>
  
  <p>So please how do i echo it properly?</p>