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

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Upload Code Help
Hi everyone I need some help with a bit of code ive been working with for a while. I am completely s

Need some ideas as to how to go about sorting this array...
Here's how the array's are created..

Code: <?php
while ($x = readdir($dp)) {

Undefined offset when using a flat file with pipe symbols
Hi, I've got a flat file/text file which I'm currently using as a member database for my site (not a

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi

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