I have an PHP array that has saved users steps:
array(
    'step_1' => 1,
    'step_2' => 1,
    'step_3' => 0,
    'step_4' => 0,
    'step_5' => 0
);
So, my user do step_1, and step_2, but he don't do other steps. Now, i want to get name of first step that he don't do, it's "step_3" in this example.
But if array looks that:
 array(
    'step_1' => 1,
    'step_2' => 1,
    'step_3' => 1,
    'step_4' => 1,
    'step_5' => 0
);
I want to get "step_5", than i know that user don't do step_5 and i can, for exapmle redirect them to specify page. How can i get it?
foreachloop, and assign the first key to result variable where the current value is 0, and break.