Re: Get just first 200 characters of field?

From: Date: Thu, 19 Oct 2000 10:47:33 +0000
Subject: Re: Get just first 200 characters of field?
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-db+get-3785@lists.php.net to get a copy of this message
Quite simple: echo substr($row["field_to_cut"],0,200); This line echoes the first 200 chars of a string. It works fine for me. Hope this helps, Roberto Cespa James Montz wrote: > Im working on my own news managment system for my web site, and I would like > to be able to post on the main page the article header, and just the first > 200 or so characters of the actual content of the article. > > How can this be done? Using PHP3 and MySQL? Is there a specific PHP or > MySQL function that would accomplish this? > > Thanks in advance, > > ____________________ > James C. Montz > Systems Engineer > Northwest Internet Services > > "A complex system that does not work is invariably found to have evolved > from a simpler system that worked just fine. " > > -- > 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 -- Colombo2000 http://www.colombo2000.it Il tuo prossimo viaggio comincia qui +---------------------------------------------+ | Roberto Cespa | | Responsabile Ricerca e Sviluppo Colombo2000 | | Email: rcespa@colombo2000.it | | Mobile: +39-380-3042732 | +---------------------------------------------+

« previous php.db (#3785) next »