Why is my json_encode not working : <p>why is this <code>json_encode</code> not working. It was working when I had two values in the array but now with three it just shows nothing. </p>

<p>Using <code>json_last_error</code> in json_encode shows this error:</p>

<pre><code>Warning: json_encode() expects parameter 2 to be integer, string given in
</code></pre>

<p>This is the array:</p>

<pre><code>[8000] =&gt; Array
    (
        [employee_id] =&gt; AAAAA
        [name] =&gt; tom  
        [tick] =&gt; 1
    )

[8001] =&gt; Array
    (
        [employee_id] =&gt; BBBB
        [name] =&gt; harry
        [tick] =&gt; 1
    )

[8002] =&gt; Array
    (
        [employee_id] =&gt; CCCC
        [name] =&gt; sam
        [tick] =&gt; 1
    )

[8003] =&gt; Array
    (
        [employee_id] =&gt; DDD
        [name] =&gt; ricky
        [tick] =&gt; 1
    )
</code></pre>

<p>This is the json encode code <code>$datas</code> is the array:</p>

<pre><code>$json = json_encode($datas, json_last_error);

var_dump($json);
</code></pre>
