I have this code and I need to compare the user input and the hardcoded 2d array. Can somebody help me with this? Thanks!

```
if (isset($_POST['submit']))
    {
    $array = array
        ( 
               0=>array
                    ( 'username'=>'Art', 
                      'password'=>'p@ssw0rd',
                      'user_id'=>'1'              
                    ),
               1=>array
                    ( 'username'=>'Berto',
                      'password'=>'1234',
                      'user_id'=>'2'
                    ),
               2=>array
                    ( 'username'=>'Carrie',
                      'password'=>'5678',
                      'user_id'=>'3'
                    ),
               3=>array
                    ( 'username'=>'Dino',
                      'password'=>'qwer',
                      'user_id'=>'4'
                    ),
               4=>array
                    ( 'username'=>'Ely',
                      'password'=>'asdf',
                      'user_id'=>'5'
                    )
             ); 
    if(in_array($_POST['user'], $users))
    {
       $key = array_search($_POST['user'], $users);

```

I want to match the username if it exist through the 2d array. It is also the same for the password field.