$json = '{"state": 0, "result": {"uuid": "f1386fb5-ecfa-41d4-a85d-b151d98df5e1", "order_id": "test-28", "amount": "10.00000000", "payment_amount": "11.95000000", "payer_amount": "10.00000000", "payer_currency": "USDT", "currency": "USDT", "comments": null, "network": "tron_trc20", "address": null, "from": null, "txid": null, "payment_status": "refund_process", "url": "https://pay.cryptomus.com/pay/f1386fb5-ecfa-41d4-a85d-b151d98df5e1", "expired_at": 1655196355, "status": "check", "is_final": false, "additional_data": null, "currencies": [{"currency": "USDT", "network": "tron_trc20"}, {"currency": "USDT", "network": "eth_erc20"}]}}';
$obj = json_decode($json);
$url = $obj->result->url;
echo $url;
echo $url;
<?php
// JSON-строка
$json_str = '{"state": 0,
"result": {
"uuid": "f1386fb5-ecfa-41d4-a85d-b151d98df5e1",
"order_id": "test-28",
"amount": "10.00000000",
"payment_amount": "11.95000000",
"payer_amount": "10.00000000",
"payer_currency": "USDT",
"currency": "USDT",
"comments": null,
"network": "tron_trc20",
"address": null,
"from": null,
"txid": null,
"payment_status": "refund_process",
"url": "https://pay.cryptomus.com/pay/f1386fb5-ecfa-41d4-a85d-b151d98df5e1",
"expired_at": 1655196355,
"status": "check",
"is_final": false,
"additional_data": null,
"currencies": [
{
"currency": "USDT",
"network": "tron_trc20"
},
{
"currency": "USDT",
"network": "eth_erc20"
}
]
}
}';
// преобразуем JSON-строку в объект
$obj = json_decode($json_str);
// получаем значение свойства url
$url = $obj->result->url;
// выводим url на страницу
echo $url;
data = :data AND ref_id = 10215
.date("d-m-Y");
.$depref1
не определен.`
:$('#bombfire').html(`
<svg>...</svg>
`);
Только в обратных "бэк-тиках" можно текст разбивать на строки. Подробнее про строки и кавычки.const str = ' \
line 1 \
line 2 \
';
for ($i=0; $i<3; $i++) {
$dddt = rand(1,15);
$insert_sql = "INSERT INTO events
SELECT MAX(id) + {$dddt}, NOW(), 10 FROM events;";
mysqli_query($mysqli, $insert_sql);
}
$array = [1933, 1732, 1523] // и дальше
function itime() {
//Текущее время
$nt = date('Y:m:d:G:i:s:', time());
list($year,$month,$day, $hour, $min, $sec) = explode(':', $nt);
$arrayTime = [1933, 1732, 1523, 1261, 1436,1436,1436,14361436,
1436,1436,1436,1436,1436,1436,1436,1436,1436,2265,22652265,2265,2265,2265];
//Узнаём ближайший час
return $arrayTime[$hour];
}
echo itime();