$output .= "<h2 class=\"entry-title\"><a href=\"" . get_the_permalink( $popular->id ) . "\" title=\"" . esc_attr( $popular->title ) . "\">" . $popular->title . "</a></h2>";
ob_start();?>
<a href="<?php the_permalink($popular->id); ?>" class="thumb-preview" rel="<?php zt_get_thumbnail2($popular->id); ?>"><img src="<?php zt_get_thumbnail($popular->id); ?>" alt="<?php the_title($popular->id); ?>" class="img250" /></a>
<?php
$output .= ob_get_clean();
$output .= "<a href=\"" . get_the_permalink( $popular->id ) . "\" title=\"" . esc_attr( $popular->title ) . "\" class="thumb-preview" rel="'.ЧТОТО_zt_get_thumbnail2($popular->id).'"><img src="'. ЧТОТО_zt_get_thumbnail($popular->id).'" alt="'.get_the_title($popular->id).'" class="img250" /></a>";
<div>
<table><tr><td>
<table><tr><td> 123 </td></tr></table>
</td></tr></table>
</div>
$dom = str_get_html($html);
$td_lvl_1 = $dom->find('div>table>tr>td');
if (count($td_lvl_1)) {
$td_lvl_2 = $td_lvl_1->find('table>tr>td', 0);
echo $td_lvl_2->innertext;
}
foreach ( $carousels as $carousel ) {
if ( !is_object($carousel)
OR !isset($carousel->slider_image)
OR !isset($carousel->alt_image)
) continue;
include dirname(__FILE__).'/default.php';
}
...
$carousels = $db->loadObjectList();
print_r($carousels); exit;
...
...
foreach ( $carousels as $carousel ) {
if (!is_object($carousel) OR !isset($carousel->slider_image) OR !isset($carousel->alt_image)) continue;
include dirname(__FILE__).'/default.php';
}
...
<div>
<?php if (is_object($carousel) && isset($carousel->slider_image) && isset($carousel->alt_image)):?>
<img src="<?=$carousel->slider_image?>" alt="<?=$carousel->alt_image?>">
<?php else:?>
<p>Carousel not configured</p>
<?php endif?>
</div>