Jord,
  I would accomplish this through SQL. You could use SELECT LEFT(mycolumn,x)
FROM mytable WHERE ...
and then display that along with a link to a page where you select the whole
string on that particular article ID. In fact, I do this exact thing on my
site.

Or you could read the whole string into an array, and use the PHP function
to retrieve the substring you want. I prefer the first option however.

Good luck,

Johan Alfredeen
PongWorld.com
www.pongworld.com

-----Original Message-----
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 3:20 PM
To: PHP General Mailing List
Subject: [PHP] Splitting Text


Hi, 
Can anyone give some pointers for my problem.
I want to pull articles out of a db and then show the first x number of
words 
with a read more link to the rest of the article. 

Could someone point me in the right direction. I've seen a code snippet for 
this, but now I can't find it :-(

TIA,

Jord

-- 
Jordan Elver
http://www.jordanelver.co.uk

Oops, my brain just hit a bad sector!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to