Strip H1 tag and its contents
Posted
by Andy
on Stack Overflow
See other posts from Stack Overflow
or by Andy
Published on 2010-05-04T07:52:48Z
Indexed on
2010/05/04
7:58 UTC
Read the original article
Hit count: 176
How can i remove
<h1>and its contents</h1>
from the following line
strip_tags(substr($article->content(),0,255)
from this complete code
<?php $last_articles = $this->children(array('limit'=>5, 'order'=>'page.created_on DESC')); ?>
<?php foreach ($last_articles as $article): ?>
<div class="entry">
<h3><?php echo $article->link($article->title); ?></h3>
<?php echo strip_tags(substr($article->content(),0,255).'...', '<p><a>'); ?>
</div>
<?php endforeach; ?>
Any help would be appreciated.
© Stack Overflow or respective owner