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.

thanks

No comments posted yet

Your Answer:

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

Problem with array max size.
Hi to everyone,
I've got a homework about filling a bidimensional array un spiral shape, I alre

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

strtotime issue
Hey all,

I'm playing around with some code, and basically the idea is:

Person changes

ECC6 - Single sign-on
We are in the process of upgrading to ECC 6 which will support single sign on with user passwords al

Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si

XML Grouping
I'm using xml_parse_into_struct to get all my elements, but now I need to group them. For example, h

I apologise! It's a newbie to PHP feedback form problem!
Hi,

I am a total newbie to PHP. I am also a unemployed and need to get a job. So after 100% r

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

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