• 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.