title: json_encode doesn't print anything
body: <p>I have the follow code which doesn't print anything: </p>
  
  <pre><code>$array = array();
  while ($res = $query-&gt;fetch_array(MYSQLI_ASSOC)) {
      array_push($array, array(
          'value' =&gt; $res['pregunta'],
          'tokens' =&gt; explode(' ',$res['pregunta']),
          'url' =&gt; $res['id-cadena']
          ));
  }
  
  echo json_encode($array);
  </code></pre>
  
  <p>But when I use print_r it works correctly:</p>
  
  <blockquote>
  <pre><code>    Array
  (
      [0] =&gt; Array
          (
              [value] =&gt; ¿Cuál es la obra de Pablo Picasso basada en triangulos?
  </code></pre>
    
    <p>etc...</p>
  </blockquote>
  
  <p>Have somebody had the same problem?
  Thanks a lot!</p>