News for hackers. Stuff that matters.
Re:Programmers: Before you turn 40, get a plan B (2009) by samsonradu on Friday August 02, 2019 @02:53PM (#20595559)
Ah, speaking of code snippet of the day. Found someone’s code trying to check if a promo-code is already used, and if not to apply it:

    $codes = $db->exec(‘SELECT code from promocode’);
    if (!in_array($myCode, $codes)){
        // use it
    }
Re:Programmers: Before you turn 40, get a plan B (2009) by cwmoore on Friday August 02, 2019 @06:47PM (#20597295)
!!