1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Unsetting array values by schedule

Discussion in 'Development' started by Hipster, Mar 19, 2017.

  1. Hipster

    Hipster Zombie

    Messages:
    214
    How can you unset array keys which are older than a day?
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    show me your array template?
     
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Use following code
    PHP:
    unset($yourarray[array_search(1$yourarray)]);
     
    jasonwynn10 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.