Title: WP ARRAY in php
Last modified: August 30, 2016

---

# WP ARRAY in php

 *  [pipoulito](https://wordpress.org/support/users/pipoulito/)
 * (@pipoulito)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wp-array-in-php/)
 * Hello
 * A WP function returns me this :
 *     ```
       Array ( [0] => Array ( [title] => tt1 [layout] => d [limit] => [one_column] => 1 [top_layout] => 0 [top_limit] => 1 [cat] => Array ( [0] => 12 ) [tag] => [time] => 0 [order] => rand [manual] => [action] => slider [pagination] => infinite-scroll [action_link_text] => View all [action_link_url] => http:// [autoplay] => [type] => posts ) [1] => Array ( [title] =>tt2 [layout] => d [limit] => [one_column] => 1 [top_layout] => 0 [top_limit] => 2 [cat] => Array ( [0] => 11 ) [tag] => [time] => 0 [order] => date [manual] => [action] => slider [pagination] => numeric [action_link_text] => View all [action_link_url] => http:// [autoplay] => [type] => posts ) [2] => Array ( [title] => tt2 [layout] => d [limit] => [one_column] => 1 [top_layout] => 0 [top_limit] => 2 [cat] => Array ( [0] => 13 ) [tag] => [time] => 0 [order] => rand [manual] => [action] => slider [pagination] => infinite-scroll [action_link_text] => View all [action_link_url] => http:// [autoplay] => [type] => posts ) [3] => Array ( [title] => tt2 [layout] => d [limit] => [one_column] => 1 [top_layout] => 0 [top_limit] => 2 [cat] => Array ( [0] => 128 ) [tag] => [time] => 0 [order] => date [manual] => [action] => slider [pagination] => load-more [action_link_text] => View all [action_link_url] => http:// [autoplay] => [type] => posts ) )"
       ```
   
 * An i’d like to know how could i write this the structure in PHP
    (like
 *     ```
       $fruits = array (
           "fruits"  => array("a" => "orange", "b" => "banana", "c" => "apple"),
           "numbers" => array(1, 2, 3, 4, 5, 6),
           "holes"   => array("first", 5 => "second", "third")
       );
       ```
   
 * )
 * Thanks

The topic ‘WP ARRAY in php’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [pipoulito](https://wordpress.org/support/users/pipoulito/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/wp-array-in-php/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
