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

Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make

Create a form of 2 numbers input and find the greatest.
Hi, everybody.

I have a homework in my training of php, which ask you to make a form that ask

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

preg_match logical error
Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div cla

Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

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