Using the PHP data() method to access data before it is output

Using the PHP data() method to access data before it is output

stolstol Posts: 16Questions: 2Answers: 1
edited February 2017 in Editor

According to the documentation here https://editor.datatables.net/manual/php/getting-started#Return-data, you can access the data before json_encoding it. There is no further mention of how to access the data. What array is returned?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,903Questions: 1Answers: 10,148 Site admin
    Answer ✓

    Its an array in the same format as the JSON returned to the client. So for example you can get the data array using $editorData['data']; and then do whatever you need with that array (presumably looping over it and changing its contents).

    Allan

  • stolstol Posts: 16Questions: 2Answers: 1

    This works! Thanks.

This discussion has been closed.