CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Problem with substr

 



JFrost
Novice

May 11, 2001, 7:09 AM

Post #1 of 2 (387 views)
Problem with substr Can't Post

Hi,

I have a description field in my database, and I'm trying to use the following function for a short results page.

$short_description = substr($long_description, 0, 65);

For some reason I only get the first 20 characters and 3 dots (...). Why is this happening, I just want the first 65 letters and no periods after that.

Please let me know what I'm doing wrong.

Thanks





wickedxter
User

May 11, 2001, 4:35 PM

Post #2 of 2 (379 views)
Re: Problem with substr [In reply to] Can't Post

well your code does work.. but is there anything in the $long_description var.?

if there is attach your code so i may look at whats wrong...

make sure you didn't miss-spell anything..


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives