<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="test">dasadasdas</div>
<?php
$html_text = '<html><body><div class="test"></div></body></html>';
$text = "";
if (preg_match("#<div class=\"test\">(.*?)</div>#si", $html_text, $regs))
{
$text = $regs[1];
}
var_dump($text);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="test">dasadasdas</div>
<?php
$html_text = "<html><body></body></html>";
$text = "";
if (preg_match("#<div class=\"test\">(.*?)</div>#si", $html_text, $regs))
{
$text = $regs[1];
}
var_dump($text);
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="test">dasadasdas</div>
<?php
$text = "";
if (preg_match("#<div class=\"test\">(.*?)</div>#si", $html_text, $regs))
{
$text = $regs[1];
}
echo $text;
?>
</body>
</html>
<?php
require_once 'simple_html_dom.php';
$data = file_get_html('https://kase.kz/ru/currency/');
if($data->innertext!='' and count($data->find('.currency-tabs__item a'))){
foreach($data->find('.currency-tabs__item a') as $a){
if(preg_match("/USD/", $a)) {
echo "$a'<br>'";
}
// $htmlText = "'<p>'.$a->plaintext.'</p>'";
// $textArray = explode('<p>', $htmlText);
// $textArray = array_filter($textArray, 'strlen');
// print_r($textArray);
}
}
?>
$( ".product-cat" ).hover(function(){
$( this ).toggleClass( "cat-hover" )
var link = $( this ).find('.product-text-link');
link.css('color','#f85e22');
},function() {
$( this ).removeClass( "cat-hover" );
var link = $( this ).find('.product-text-link');
link.css('color','#000000');
});
Facebook
Вк
Telegram