Deleting array element from cookie

Discussion in 'PHP' started by learnerabn, Oct 10, 2010.

  1. #1
    Hi all,

    I'm having an array in cookie i want to delete a particular element from that cookie array.
    Whether is it possible.if possible means how?
    Can any body tell me?

    Thanks in advance...
     
    learnerabn, Oct 10, 2010 IP
  2. axelay

    axelay Peon

    Messages:
    54
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    I would do the simplest thing. Get the array from the cookie, delete the element, reset the cookie...

    aXe
     
    axelay, Oct 11, 2010 IP
  3. learnerabn

    learnerabn Peon

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes me too doing the same thing but since if we do like this it will increase the lines of code. so only i'm search for other alternatives...
    Thanks...
     
    learnerabn, Oct 11, 2010 IP
  4. cyberman1986

    cyberman1986 Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    just replace this array with a new array without particular value.

    Cheers!
     
    cyberman1986, Oct 12, 2010 IP