Extracting a flexibel amount of text part 2
Scottiegirl,
Try this:
<?php
//define string
$text ="<p>Fans of the 1980 will have little trouble recognizing the group's distinctive synthesized sounds and hypnotic dance beats, since these two elements are present in almost every song on the album.</p>";
$text .="<p>However, the lack of diversity and range is troubling, and I'm hoping we see some new influences in the next album. More intelligent lyrics might also help.</p>";
echo 'Before:';
echo $text;
echo 'After:';
echo eregi_replace('<\/p><p>[[:print:]]*', '<br /><a href="_p0026.html">Read more ...</a><p />', $text);
?>
cheers,
john
|