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

Help with captcha script needed
Hello,

I am working on a script where reCAPTCHA or a similar form of CAPTCHA will be used, f

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

getting rid of quotes in strings
sick of trying to deal with them in multiple ways (entering in and taking from database, echoing, ec

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

Need help PLEASE
ok i have this warning showing up

Warning: in_array() [function.in-array]: Wrong datatype for

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