Please take a look at our documentation to see how to pass a PHP array in wpDataTables.
The format of the serialized array should be the following: 2D-array, where the parent level is an indexed array, and the second level is an associative array. Parent array entries will be parsed as rows, child array keys will be parsed as column headers, and child array values as cell values.
Also, please note: if your data set is excessively large (many thousands of rows), a serialized PHP format for creating a wpDataTable would not be a good solution since the page generation time and size would significantly increase. MySQL-based wpDataTables with server-side processing is the best option for large datasets.
Hi,
how can I make wpDataTables parse arrays returned from a query, so that it will display the values in the array instead of the array itself?
Thanks in advance
Hello Widevisions.
Thank you for your purchase.
Please take a look at our documentation to see how to pass a PHP array in wpDataTables.
The format of the serialized array should be the following: 2D-array, where the parent level is an indexed array, and the second level is an associative array. Parent array entries will be parsed as rows, child array keys will be parsed as column headers, and child array values as cell values.
Also, please note: if your data set is excessively large (many thousands of rows), a serialized PHP format for creating a wpDataTable would not be a good solution since the page generation time and size would significantly increase. MySQL-based wpDataTables with server-side processing is the best option for large datasets.
I hope this helps.
Best regards.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables