<td class="sr-page__list__item_img">
<? if( $v['imgs'] ): ?>
<span class="rel inlblk">
<a title="<?= $v['title'] ?>" href="<?= $v['link'] ?>" class="thumb stack rel inlblk">
<img alt="<?= $v['title'] ?>" src="<?= $v['img_s'] ?>" class="rel br2 zi3 shadow" />
<? if( $v['imgs'] > 1 ): ?>
<span class="abs border b2 shadow"> </span>
<span class="abs border r2 shadow"> </span>
<? endif; ?>
<? else: ?>
<img class="rel br2 zi3 shadow" src="def-m.png" alt="Алиса">
</a>
</span>
<? endif; ?>
</td>
function getFormData($method) {
// GET или POST: данные возвращаем как есть
if ($method === 'GET') return $_GET;
if ($method === 'POST') return $_POST;
// PUT, PATCH или DELETE
$data = array();
$exploded = explode('&', file_get_contents('php://input'));
foreach($exploded as $pair) {
$item = explode('=', $pair);
if (count($item) == 2) {
$data[urldecode($item[0])] = urldecode($item[1]);
}
}
return $data;
}
$dom = new DOMDocument(1, "UTF-8");
@$dom->loadHTML($html);
$body = $dom->getElementsByTagName('body')[0];
$new_html = '';
foreach ($body->childNodes as $node)
{
if( $node->nodeName === '#text' ){
$new_html .= $node->textContent;
}else{
$new_html .= '<'.$node->nodeName.'>'.$node->textContent.'</'.$node->nodeName.'>';
}
}