title: what's the difference between return/echo json_encode in php
body: <p>maybe this is a simple and stupid question.</p>
  
  <p>As we know, <code>echo</code>  just print the variable out, and in a php function <code>return</code> statnds for return something to the function invoker.</p>
  
  <p>I notice someone use <code>echo json_encode</code> while others using <code>return json_encode</code>,</p>
  
  <p>I return something to jquery, and using echo/return are <strong>both ok</strong>. </p>
  
  <p>But when I find that almost everyone using <code>echo json_encode</code>, and why ?</p>
  
  <p>Thanks.</p>