<?php foreach($cate_news as $item): ?>
<?php 
$string = $item->title;
$validate = explode(" ",$string);
$result = $validate['0'];
$replace = str_replace($result," ",$string);	  
$title = '<span class="subhead">'.$result.'</span>'.$replace.'';
?>
<section class='pencities fade-in'>
  <header class='columns-10 section-center'>
    <h2><?php echo $title; ?></h2>
  </header>
  <div class='columns-10 section-center pencities-list'>
    <ul class='columns columns-10'>
		<?php $i=0; ?>
      <?php foreach($news_home as $items): ?>
	  <?php if($item->id == $items->to_cate && $items->id == $items->to_id): ?>
		<?php $i++ ?>
		<?php if($i==1): ?>
      <li class='column columns-quarter first-column first-row promo-tile'><a href='<?php echo e($items->alias); ?>' title='Hanoi Culture'><img src='<?php echo e($items->thumb); ?>' alt='<?php echo e($items->title); ?>' title='<?php echo e($items->title); ?>'></a><a href='<?php echo e($items->alias); ?>'>
        <h5 class='multiline reverse'><?php echo e($items->title); ?></h5>
        </a><a href='<?php echo e($items->alias); ?>' class='upcase with-arrow'>View Detail</a></li>
		
		<?php else: ?>
		 <li class='column columns-quarter first-row promo-tile'><a href='<?php echo e($items->alias); ?>' title='Hanoi Culture'><img src='<?php echo e($items->thumb); ?>' alt='<?php echo e($items->title); ?>' title='<?php echo e($items->title); ?>'></a><a href='<?php echo e($items->alias); ?>'>
        <h5 class='multiline reverse'><?php echo e($items->title); ?></h5>
        </a><a href='<?php echo e($items->alias); ?>' class='upcase with-arrow'>View Detail</a></li>
		<?php endif; ?>
		<?php endif; ?>
		<?php endforeach; ?>
    </ul>
  </div>
</section>
<?php endforeach; ?>