par
pipoulito » 06 nov. 2015, 15:31
Bonjour,
Travaillant sous Wordpress, j'aurais besoin de traduire ce genre de code de retour :
Code : Tout sélectionner
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 ) )
dans une déclaration de tableau PHP, dans ce style :
Code : Tout sélectionner
$fruits = array (
"fruits" => array("a" => "orange", "b" => "banana", "c" => "apple"),
"numbers" => array(1, 2, 3, 4, 5, 6),
"holes" => array("first", 5 => "second", "third")
);
Pourriez-vous m'aider car je ne comprends pas l'arborescence du ARRAY qui m'est retourné
merci d'avance.
Bonjour,
Travaillant sous Wordpress, j'aurais besoin de traduire ce genre de code de retour :
[code]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 ) )[/code]
dans une déclaration de tableau PHP, dans ce style :
[code]$fruits = array (
"fruits" => array("a" => "orange", "b" => "banana", "c" => "apple"),
"numbers" => array(1, 2, 3, 4, 5, 6),
"holes" => array("first", 5 => "second", "third")
)[/code];
Pourriez-vous m'aider car je ne comprends pas l'arborescence du ARRAY qui m'est retourné
merci d'avance.