Hello,
I would like to know how to have it so that just the first few sentences of an article in a database show up on one page, with a link that says 'more' that takes you to the full article.
Thanks in advance.
This is most easily accomplished limiting the number of characters rather than sentences, since sentences can vary so widely. Try something like this:
$desc = substr($myrow[description], 0, 256);
For more information on substr check here: http://www.php.net/manual/en/function.substr.php
to take the string with the first 20 spaces...then you have whole words as opposed to the taking of the first 250 characters or whatever...
$desc=explode(" ",$mystring); for ($1=0;$i<=20;$i++)[ $mydesc = mydesc." ".$desc[$i]; }
hth