json_encode

json_encode

srayner02srayner02 Posts: 15Questions: 0Answers: 0
edited August 2012 in General
I recently started using json_encode in php instead of hand rolling the json output.
However I notice that datatables produces the following html markup;





It doesn't cause any problems, but i think it is invalid markup because of the a and < attributes in the tag.

My json responce (from json_encode) is;

"aaData":[["COMP 270","ae2134y compressor","",""]]

Replies

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    edited August 2012
    Your HTML in the response is invalid - there is no closing bracket on the opening `a` tag.

    Allan
  • srayner02srayner02 Posts: 15Questions: 0Answers: 0
    Thanks Allan.
    Well spotted.
This discussion has been closed.