Eğer birden fazla kayıt mevcut ise aşağıdaki kod blogu işinize yarabilir


$json = '{
"id":11631253,
"created_at":"2018-10-13T08:13:38.809469028Z",
"phone":"+79000381454",
"product":"vkontakte",
"price":21,
"status":"RECEIVED",
"expires":"2018-10-13T08:28:38.809469028Z",
"sms":[
{
"id":3027531,
"created_at":"2018-10-13T08:20:38.809469028Z",
"date":"2018-10-13T08:19:38Z",
"sender":"VKcom",
"text":"VK: 09363 - use this code to reclaim your suspended profile.",
"code":"09363"
}
],
"forwarding":false,
"forwarding_number":"",
"country":"russia"
}';

$json = json_decode($json,true);




foreach($json["sms"] as $val):
echo $val["code"];
endforeach;