Q:

How do i get a data from JSON server response in PHP

I'm sending a JSON request in PHP and i get a response from the server, that looks like this:
{"success":true,"result":
{"items":
[{"woj":"łódzkie","powiat":"kutnowski","gmina":"Bedlno","kod":"99-        
311","miasto":"Adamów","id":"99-311Adamów167271172700"}]},
"error":null,
"unAuthorizedRequest":false}

I want to pick a content from "woj" and "powiat" but it doesn't work.
My code looks like this:
$code = 'https://hetman.e4b.com.pl/api/services/app/kodPoczt/KodPocztInfo? 
 kod='.$kod;
 $ch = curl_init();
 //set the url, number of POST vars, POST data
 curl_setopt($ch,CURLOPT_URL, $code);
 curl_setopt($ch,CURLOPT_POST, true);
 curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
 //execute post
 $result1 = curl_exec($ch);
 //close connection
 curl_close($ch);
 echo $result1;
 $wynik  = json_decode($result1, true);
 echo $wynik['result'][0]['woj'];   

A:

show your full code... curl isnt inited in your example and return_transfer isnt set. whats the output of $result1?
anyway its 
$wynik['result']['items'][0]['woj'];

