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

PHP FTP Can't upload Big FIles
Anyone had any success using FTP to upload a file say 90m?

im using ftp_put and it returns fa

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

Keeping track of php uploads
Hello all.

I was looking at the way PHP handles file uploads.
It seems that PHP uses a tem

value not going in data base
hello friends....
i am having a working javascript....when i am selecting any

Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

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