Title: multi-dimensional array in theme not working
Last modified: August 19, 2016

---

# multi-dimensional array in theme not working

 *  [walkacrossfire](https://wordpress.org/support/users/walkacrossfire/)
 * (@walkacrossfire)
 * [17 years, 12 months ago](https://wordpress.org/support/topic/multi-dimensional-array-in-theme-not-working/)
 * I’m trying to build a multi-dimensional array from a database query in a theme
   page. if I do this: $array[$name]=$value; it works fine,but, as soonas I try 
   this: $array[$name][0]=$value; or $array[$name]=array(0=>$value); it fails. Anyone
   know why? Please help!

Viewing 1 replies (of 1 total)

 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/multi-dimensional-array-in-theme-not-working/#post-770118)
 * Dupe: [http://wordpress.org/support/topic/177473?replies=3](http://wordpress.org/support/topic/177473?replies=3)

Viewing 1 replies (of 1 total)

The topic ‘multi-dimensional array in theme not working’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Chris_K](https://wordpress.org/support/users/handysolo/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/multi-dimensional-array-in-theme-not-working/#post-770118)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
