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
Post a Comment