Convert PHP Array to Json. Using Code-igniter
<p>I Convert PHP Array To JSON Success But My target not full fill.</p>

<p><strong>My out put is:</strong></p>

<pre><code>{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}
</code></pre>

<p>My Requirement :</p>

<pre><code>[{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}]
</code></pre>

<p>Here my code:-</p>

<pre><code>if ($AdminRecord) {

                    foreach($AdminRecord-&gt;result() as $results)
                    {
                      echo json_encode($results);
                    }
                }
</code></pre>