Skip to content

Instantly share code, notes, and snippets.

@harrynewsome
Last active December 22, 2015 12:20
Show Gist options
  • Save harrynewsome/280af7e24d0d8cd2dbbc to your computer and use it in GitHub Desktop.
Save harrynewsome/280af7e24d0d8cd2dbbc to your computer and use it in GitHub Desktop.
<?php
$array = [
"children_name" => "Colour",
"children_type" => "swatch",
"children" => [
[
"value" => "Red",
"colour" => "#f00",
"children_name" => "Size",
"children_type" => "dropdown",
"children" => [
[
"value" => "Small",
"children_name" => "With Bananas?",
"children_type" => "radio",
"children" => [
[
"value" => "Yes",
"product_id" => 1
],
[
"value" => "No",
"product_id" => 2
]
]
],
[
"value" => "Medium",
"children_name" => "With Oranges?",
"children_type" => "radio",
"children" => [
[
"value" => "Yes",
"product_id" => 3
],
[
"value" => "No",
"product_id" => 4
]
]
],
[
"value" => "Large",
"children_name" => "With Tentpoles?",
"children_type" => "radio",
"children" => [
[
"value" => "Yes",
"product_id" => 5
],
[
"value" => "No",
"product_id" => 6
]
]
]
]
],
[
"value" => "Blue",
"colour" => "#00f",
"children_name" => "Size",
"children_type" => "dropdown",
"children" => [
[
"value" => "Small",
"children_name" => "With Apples?",
"children_type" => "radio",
"children" => [
[
"value" => "Yes",
"product_id" => 7
],
[
"value" => "No",
"product_id" => 8
]
]
],
[
"value" => "Medium",
"children_name" => "With Pineapples?",
"children_type" => "radio",
"children" => [
[
"value" => "Yes",
"product_id" => 9
],
[
"value" => "No",
"product_id" => 10
]
]
],
[
"value" => "Large",
"children_name" => "With Pears?",
"children_type" => "radio",
"children" => [
[
"value" => "Yes",
"product_id" => 11
],
[
"value" => "No",
"product_id" => 12
]
]
]
]
]
]
];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment