$result_servers = $mysqli->query("SELECT `id` FROM `news` WHERE `autor`='{$nickname}'"); // запрос на выборку
while($row_servers = $result_servers->fetch_assoc())// получаем все строки в цикле по одной
{
$id_servers[] = $row_servers['id'];
}
print_r($id_servers);
{
"128.3.3.1:1231":
{"name":"NAME SERVER 1","gamemode":"mods","url":"https://url.ru","lang":"ru","players":412,"peak":521,"maxplayers":3333},
"127.0.0.1:1234":
{"name":"NAME SERVER","gamemode":"mods","url":"https://url.ru","lang":"ru","players":598,"peak":609,"maxplayers":3000}
}
$json= "https://jsonurl";
$data = json_decode(file_get_contents($json),true);
$ip = "127.0.0.1:1234";
$item = $data[$ip];
//Плохо
$ip546 = $_GET['s'];
$port546 = $_GET['p'];
require "vendor/SourceQuery/bootstrap.php";
use xPaw\SourceQuery\SourceQuery;
//хорошо
require "vendor/SourceQuery/bootstrap.php";
use xPaw\SourceQuery\SourceQuery;
$ip546 = $_GET['ip'];
$port546 = $_GET['port'];
var_dump($_REQUEST);
<?php
$url = "http://hurtworld.pro/vkrss-master/index.php?id=[xfvalue_vk]&access_token=e3a2f8bbe3a2f8bbe3a2f8bb95e3cfdcb4ee3a2e3a2f8bbbe323a8a6ed61cd403611649"; // Адрес до RSS-ленты
$rss = simplexml_load_file($url);
foreach ($rss->channel->item as $items) {
//добавляем target="_blank"
$items->description = str_ireplace('<a href=', '<a target="_blank" href=', $items->description);
echo <<<HTML
<h5><font color="white"><code>{$items->pubDate}</code></font></h5>
<p><font color="white">{$items->description}</font></p>
<a target="_blank" href="{$items->link}"><button class="label label-success" style="text-decoration: none;">
<font color="white"> Подробнее</font>
</center>
</button>
</a>
<hr>
HTML;
}
UPDATE dle_users
SET user_balance = user_balance + round(user_balance / 100.0, 2)
UPDATE dle_users
SET user_balance = user_balance + ceil(user_balance / 100.0 * 100) / 100.0
^ ^
корректировка ceil по 2 знакам после запятой