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

Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLAN

generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q

Disabling SAP menu
How do I disable SAP menu for all the users and just restrict them to User Menu in SAP ECC 6.0?

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For

Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

Php script to read msword file
hi,

I need to read a msword file and i want to print the contents in that word file.

i

Undefined variable: adHTML
Hello:

While checking my site error logs, I've noticed one repetitive error that fills the lo

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