first few characters only


Posted on 16th Feb 2014 07:03 pm by admin

hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have seen this in many news sites where the news story headline reads like "woman found in obama's bedroom today at....... read more. ('read more' is a link)

what i am looking for is something that says i will take the first 100 characters of the entry and then print "...read more" as a link to the full story.

Did you know?Explore Trending and Topic pages for more stories like this.
thanks
No comments posted yet

Your Answer:

Login to answer
246 Like 28 Dislike
Previous forums Next forums
Other forums

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;
while(!feof($openedfile))
{<

Problem with HTTP Caching...?
Hi there, im trying to implement caching. But it doesn't always work.
I post it here because ther

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash