{
"site": [
{
"tab": {
"lookup": "primer_pole",
"label": "primer"
},
"settings": [
{
"lookup": "qw_qw",
"label": "qwqw",
"type": "text",
"access": "normal"
}
]
},
{
"tab": {
"lookup": "mail-form",
"label": "mail-form"
},
"settings": [
{
"lookup": "email",
"label": "email",
"type": "text",
"access": "normal",
"value": "paw.rus@yandex.ru"
}
]
}
]
}
<?php
$str = '{
"site":[
{
"tab":{
"lookup":"primer_pole",
"label":"primer"
},
"settings":[
{
"lookup":"qw_qw",
"label":"qwqw",
"type":"text",
"access":"normal"
}
]
},
{
"tab":{
"lookup":"mail-form",
"label":"mail-form"
},
"settings":[
{
"lookup":"email",
"label":"email",
"type":"text",
"access":"normal",
"value":"paw.rus@yandex.ru"
}
]
}
]
}';
$json = json_decode($str, true);
$email = $json['site'][1]['settings'][0]['value'];
if ($i = array_search($UserData, "mail-form") !== false)
$Mailaddress = $UserData["site"][$i]["settings"][0]["value"];