www.webdeveloper.com
Results 1 to 2 of 2

Thread: perlcode counter help

  1. #1
    Join Date
    Jan 2003
    Location
    PA
    Posts
    1,898

    perlcode counter help

    I'm not sure anyone can help here, but I thought I'd try. I am using the Coranto news program to post things on my website. I am setting up a news scroller script to be dynamically generated through this. The program uses perlcode. I have a counter ($counter++), which increments with each news headline I have. I counter currently starts with 1, but I need it to start with 0. How can I do this?

    Thanks!!

  2. #2
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    There must be more to this question than meets the eye!

    $counter = 0; # near the top of your code.
    $counter++; # after you process the value.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles