panteLx to execute the function only onces and use the result of my json result instead of executing my function multiple times
That makes sense - but they are effectively already there in the posts table - I don't see any need to store them twice. What you could do is modify that function so that it uses the API to retrieve just one record each time the function is executed rather than pulling what sounds like all of the table
I'd need to see your code to comment further
EDIT: As a side note, by using JSON, you are already acquiring the data in an array. By using print_r
, you can effectively pick out the data you need