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

PHP5/Zend 2.0 - Resources
PHP5 Snapshots
http://snaps.php.net/

ZEND 2.0 Feature Overview and Design (PDF File

Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very

Help with Hyperlink
Hi,

What I am trying to do may be simple, I just can't get it to work. Ok...

I am usin

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

How to ... (FAQs)
... get e-mail notifications As several people asked how to get e-mail notifications when new posti

script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of

PHP doesn't send my mail
Hi all, I found this and used it to send mail. Simple contact form with some required fields. The va

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website

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