Thread: Barcode reset

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    Barcode reset


    Hi, Im having a problem resetting a barcode in an emailer. Im sending a email in a loop. The barcode is the same for every emailer created.

    Please can you help with resetting the $barcode variable each time the loop runs.

    i tried:

    While:

    //code

    reset ($barcode);
    $i++;
    endwhile;

    Comments on this post

    • Jacques1 disagrees : Ignoring the advice you get and starting a new thread with a completely out of context idea makes little sense.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    18
    Rep Power
    0
    Try this instead
    PHP Code:
    unset($barcode); 
    Or if that doesnt work, just try assigning null like:
    PHP Code:
    $barcode NULL$barcode false
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    Gaston, if you refer to this code, your barcode problem has nothing to do with "resetting" the variable or whatever. The program logic is simply wrong. That's what I tried to tell you last time, but I haven't heard from you since.

    When you always fetch the same database row in every iteration, you always get the same barcode. There's no reset function that will change this.

IMN logo majestic logo threadwatch logo seochat tools logo