RE: [PHP] Splitting Text

From: Date: Mon, 06 Aug 2001 21:42:24 +0000
Subject: RE: [PHP] Splitting Text
Groups: php.general 
Request: Send a blank email to php-general+get-61499@lists.php.net to get a copy of this message
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:jord.elver@virgin.net] 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#61499) next »