To use a DataTable with a RESTful API JSON PHP

To use a DataTable with a RESTful API JSON PHP

ShiveryShivery Posts: 3Questions: 1Answers: 0

Hello guys,

I'm encountering a problem. After searching for 2 hours for an answer to my problem, I decided to directly ask a question here.
So, I'm actually trying to use Datatable with datas in JSON via CURL from PHP. I didn't find anything I could understand on the internet and so... Could you help me ? :(

I know I have to put something like this in my code but I don't know where and how ?

Here is the code with the one I would like to have a DataTable ->

Thank you in advance for your help.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,460Questions: 1Answers: 10,466 Site admin
    Answer ✓

    That looks like it should work to me. If you "View source" on the page, could you paste it in here please so I can take a look at it?

    Thanks,
    Allan

  • ShiveryShivery Posts: 3Questions: 1Answers: 0
    edited December 2017

    Hello,

    I solved my problem, my server is simply in HTTPS and google's link was in HTTP.
    + Colspan wasn't corresponding with the number of <th> :smile:

  • allanallan Posts: 63,460Questions: 1Answers: 10,466 Site admin

    Cool :)

    It looks like the server is responding with JSON data, so you could use the ajax option to request the data from the client-side, rather than having the server do it.

    Regards,
    Allan

  • ShiveryShivery Posts: 3Questions: 1Answers: 0

    Hi Allan,

    Thank you for your advice :smile:

This discussion has been closed.