I Convert PHP Array To JSON Success But My target not full fill.
My out put is:
{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}
My Requirement :
[{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}{"id":"145","logid":"","name":"asasa"}{"id":"144","logid":"","name":"qwsqwswq"}]
Here my code:-
if ($AdminRecord) {
foreach($AdminRecord->result() as $results)
{
echo json_encode($results);
}
}