Help convert string to json array such request
such code:
<? header("Content-Type: text/html; charset=utf-8"); //if($_SERVER["REQUEST_METHOD"] == "POST"){ $keyword = $_POST['id']; $data = array( 'iframe_delete'=>'true', 'varname'=> 'intelSearchData', '__number'=> '2', 'keyword'=> 'камера'//$keyword, ); $ch = curl_init('http://connectkeyword.aliexpress.com/lenoIframeJson.htm?'.http_build_query($data)); curl_setopt($ch, CURLOPT_USERAGENT, 'IE20'); curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookies.txt'); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $page=curl_exec($ch); curl_close($ch); $json = substr($page, 45, -9); //$json = json_decode($json); print_r($json); //} ?>