title: PHP json_encode array(3) return false
body: <p>I have a <code>mysqli</code> query that returns a <code>multidimensional array</code>.</p>
  
  <p>I'm trying to encode the php array:</p>
  
  <pre><code>array(3) {
    [0]=&gt;
    array(8) {
      ["cod_evento"]=&gt;
      string(1) "3"
      ["titulo"]=&gt;
      string(20) "Fiesta de cumpleaños"
      ["descripcion"]=&gt;
      string(23) "Mi fiesta de cumpleaños"
      ["puntuacion"]=&gt;
      string(1) "1"
      ["direccion"]=&gt;
      string(13) "c/ falsa 1234"
      ["imagen"]=&gt;
      string(115) "http://static.guim.co.uk/sys-images/Guardian/Pix/pictures/2014/4/11/1397210130748/Spring-Lamb.-Image-shot-2-011.jpg"
      ["fecha"]=&gt;
      string(19) "2015-01-01 00:00:00"
      ["cod_usuario"]=&gt;
      string(1) "1"
    }
  
    [....]
  }
  </code></pre>
  
  <p>But when I try <code>json_encode($array)</code> it returns <code>bool(false)</code></p>
  
  <p>When I try to encode an array(2) or (1), then it works.</p>