JQuery JSONP turn result into PHP array

108

I have been racking my small brain for ages now, so can this be done? if so how. I return a json array via jQuery Ajax request like this

dataType: 'jsonp', data: "somedata=this", jsonp: 'jsonp_callback', url: url,

I get the data OK like this (Where field is one key in the array) - I know it's there because it appends properly.

for (var key in data) { if (data.hasOwnProperty(key)) { jQuery('body').append(data[key]['Field']+'<br />'); } But can I convert the returned data to a PHP array? which is really what I want to do

456

Answer

Solution:

OK decided to go a different route all together and use Curl

People are also looking for solutions to the problem: weather api - PHP file() function for extracting data from URL

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.