I am using CakePHP 2.3.6. In one of my projects, I want to use Ajax
for searching data
. My plan is, user will input parameters/fields to search specific data. After they input data, an Ajax request
will be sent to the controller and the controller will return the result data and the result data will be shown in a specific div
.
So, first I tried to return the result in normal php array
and show that array in a table
. But, it didn't work. Then I got a suggestion to use JSON
as the return data type. Now I am trying to use it.
But, I don't know yet how to show JSON
data/array in a table
. So, can you please give me an example of how to do it ?
Thanks