How to convert an array in PHP into a valid JSON request and send it to web service URL in following scenario? -


i've got following array titled $val in php :

array (     [page_id] => 208     [invite_emails] =>      [invite] => array         (             [0] => 970             [1] => 991             [2] => 992         )  ) 

i want convert above array valid json request , send web service url.

how should it? please me.

thanks in advance.

your question rather broad, convert php array json object easy.

$jsonstring = json_encode($array); 

as sending url, this question contains info.

or if want use curl, this resource pretty good.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -