title: PHP json_encode html element contains unwanted white space
body: <p>I have a problem here.</p>
  
  <p><code>index.php</code></p>
  
  <pre><code>ob_start();
  include '../view/user.php';
  $include = ob_get_clean();
  
  echo json_encode(array(
  "success" =&gt; true,
  "status" =&gt; "ok",
  "data" =&gt; $include));
  </code></pre>
  
  <p><code>user.php</code></p>
  
  <pre><code>&lt;div&gt;
  &lt;h2 class='workspace-name'&gt;
  &lt;?php echo $name; ?&gt;
  &lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is if I indent the HTML element in <code>user.php</code> properly (for readability), there will be a lot of <code>\r\n\t\t\t</code>, provided I use <code>jquery.get</code> to get JSON dataType.</p>
  
  <p>How do I get rid of the <code>/r/t/n</code>? Although it doesn't display on screen I don't feel right about it. Is there any better solution?
  Any question please drop in the comment I will edit this. thanks</p>