Title: Search multidimensional array with meta_query()
Last modified: August 20, 2016

---

# Search multidimensional array with meta_query()

 *  Resolved [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * (@doodlebee)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/search-multidimensional-array-with-meta_query/)
 * Hey all,
 * I’m updating my plugin, and it’s going well, but I have an issue I’m running 
   into. query_posts has a cool new addition called “meta_query”, and it’s making
   my fe easier. However, I am running into an issue: I have a field set in the 
   database (called “instructions”) that’s filled with custom metabox info. The 
   stuff put into the filed is an array. That’s not an issue at all – putting that
   in and taking it out to manipulate it is not an issue.
 * My issue is that one of the array keys (within the instructions array) holds 
   an array of values. The other array keys just hold strings. I’m doing a query_post
   based on what’s not only set within a key (holding a single string), but within
   a secondary key – the one that holds the array.
 * Confused yet? LOL
 * my code is this:
 *     ```
       $instruction_query = new WP_Query(array('post_type' => 'instructions', 'post_status' => 'publish',
       'meta_query' => array( 'relation' => 'OR',
       array('key' => 'instructions', 'value' => $pagenow, 'compare' => 'LIKE'),							array('key' => 'multi', 'value' => $pagenow, 'compare' => 'LIKE')
       )
        )
       );
       ```
   
 * the “multi” is what holds an array as its value. I can’t seem to get the syntax
   correct for searching that key-within-a-key. Anyone know how I can do that? I’ve
   tried making the key “instructions[‘multi’]”, as well as just making the key “
   instructions” and the value “array(‘multi’ => $pagenow)”, but neither work. (
   I’ve tried other crazy stuff to no avail as well)
 * Anyone have any tips or ideas for me?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * (@doodlebee)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/search-multidimensional-array-with-meta_query/#post-2887827)
 * Okay, well, I’ll mark this as “resolved” because after much searching (before
   and after posting this) it seems what I want isn’t possible. So I’ve found an
   alternate route to do what I need done. So even though I can’t answer *this* 
   exact question, I did figure out how to do what I needed through different means.

Viewing 1 replies (of 1 total)

The topic ‘Search multidimensional array with meta_query()’ is closed to new replies.

## Tags

 * [meta_query](https://wordpress.org/support/topic-tag/meta_query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/search-multidimensional-array-with-meta_query/#post-2887827)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
