`array_search` is already done at line 69, why not just add 3 to `$key` and remove `else` part is useless ?