In the Kendo UI - Tutorial: Intro to Building Apps with Kendo UI And PHP - Part 1, I got as far as wiring up the grid.
The problem is that when the PHP file gets read, it’s getting read as HTML and not as JSON. The fix was to put the header. The suggested fix was to specify in the PHP file right before echo back that the type is JSON. by adding a header as shown below:
// add the header line to specify that the content type is JSON
header("Content-type: application/json");
echo "{\"data\":" .json_encode($arr). "}";
I followed the suggestion strictly but I get the following error message:
Warning: Cannot modify header information - headers already sent by (output started at /home/saulo/public_html/aw001/index.php:6) in /home/saulo/public_html/aw001/index.php on line 16
{"data":[{"first_name":"Richard","last_name":"Gere"},{"first_name":"George","last_name":"Clooney"},{"first_name":"Glenda","last_name":"Jackson"},{"first_name":"Lawrence","last_name":"Smith"}, etc...
HELP please!
I searched stackoverflow but I couldn't find the same problem.