Multidimensional Array

The multidimensional array in this case is a multi-dimensional associative array, or a key-value pair. The key being 'status' and the value being your array of strings.

In the conditional check you have attempted to access values by a numerical index, which in this case do not exist as nothing has been set to use those indexes. To access the values set above you would do something like this: $args['status'][1];

Associative arrays and Arrays are treated as the same type in php, the only difference being that associative array keys that are strings would be accessed that in mind. As such there are built in php functions to ‘iterate’ over associative arrays, such as foreach, which may give the impression that they are distinctly different beasts when they are not.

For more information check out the php docs here:
http://php.net/manual/en/language.types.array.php
And specifically this example:
http://php.net/manual/en/language.types.array.php#example-61

Update

All that being said, in the code above it seems like it’s failing due to an issue with the conditional checks.

When the if statement is executed, it is re-assigning the variable to the result of the function to the right of the equals sign. So it is setting $active_memberships to be equal to the result of wc_memberships_get_user_memberships() function. If the result of the function is not false or NULL, or some other falsey value, it will pass the check while setting $active_memberships to the new value. By setting this to a new value it is kind of destroying the purpose of that variable, as I imagine you want to use it to store all the memberships of the user and then check for each membership later to show particular content or do something else in code.

So it may be that you are intending to just set $active_memberships up once with your args, then test for the presence of any memberships and then any particular memberships. For example:

if (!empty($active_memberships)) {
   // show content if the current user has any memberships

   if ( in_array('wcm-active', $active_memberships) ) {
       // show content if 'wcm-active' is present in the active_memberships
   }

   if ( in_array('wcm-delayed', $active_memberships) ) {
       // show content if 'wcm-delayed' is present in the active_memberships
   }

}

It’s up to you to decide how best to structure these controls, but this should get you progressing a bit further!

So there’s some learning in this post. How to access associative array values and a bit about conditional statements – that you can set variables during the evaluation of a conditional statement. You can do this in if statements much in the same way a for loop would set a variable on each iteration. This way of setting a variable is often unclear to a person reading such code though, so I would tend to avoid it.

You can read more on php’s control structures here:
http://php.net/manual/en/language.control-structures.php

And comparison operators here:
http://php.net/manual/en/language.operators.comparison.php