Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 28th, 2008, 08:22 PM
Friend of Wrox
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default Extracting a flexibel amount of text part 2

Try this:

  //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);


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting a flexible amount of text from a field scottiegirl PHP Databases 2 July 28th, 2008 09:57 AM
Extracting Text Jeff Mason BOOK: Beginning Regular Expressions 1 October 24th, 2006 06:38 AM
How display large amount of dynamic text relaytest49 ASP.NET 2.0 Professional 2 October 6th, 2006 02:19 PM
Help with large amount of text and page breaks rwodabek BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 May 12th, 2006 07:49 AM
Extracting text between tags aware Classic ASP Professional 4 December 24th, 2003 04:25 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.