"odds", "game_code"=>"zq", "match_id"=>"3740504", "lg_id"=>"2630139", "source"=>"hg0088", "data"=>[ [ "match_id"=>"3740504","lg_id"=>"2630139","odds_code"=>"ior_HTSY","status"=>0,"sort"=>0,"p_code"=>"sw_HTS","odds"=>3.14,"condition"=>"大","odds_only"=>"2a1fd6f86b9d61545286ceec5b8d9404","sole"=>"2a1fd6f86b9d61545286ceec5b8d9404","source"=>"hg0088","type"=>0,"team"=>"" ], [ "match_id"=>"3740504","lg_id"=>"2630139","odds_code"=>"ior_HTSY","status"=>0,"sort"=>0,"p_code"=>"sw_HTS","odds"=>3.14,"condition"=>"大","odds_only"=>"2a1fd6f86b9d61545286ceec5b8d9404","sole"=>"2a1fd6f86b9d61545286ceec5b8d9404","source"=>"hg0088","type"=>0,"team"=>"" ] ] ]; //str = '{"cmd":"test","act":"odds","data":"'.json_encode($array,256).'","time":1558492565,"token":"aasasfa"}'; $lastArr = [ "cmd"=>"test", "act"=>"odds", "time"=>1558492565, "token"=>"aasasfa", 'data'=>$array ]; $str = json_encode($lastArr,256); $r = $client->send($str); $msg = $client->receive(); echo "Recive: ".$msg."\n\n\n"; $client->close();