得到具体数值我有以下阵列结构:多维数组 - 如何从子阵列
Array ( [0] => Array ( [product_option_id] => 236 [option_id] => 14 [name] => Masura S [type] => select [option_value] => Array ( [0] => Array ( [product_option_value_id] => 33 [option_value_id] => 53 [name] => Alb [price] => [price_prefix] => + ) [1] => Array ( [product_option_value_id] => 35 [option_value_id] => 55 [name] => Rosu [price] => [price_prefix] => + ) ) [required] => 0 ) [1] => Array ( [product_option_id] => 237 [option_id] => 15 [name] => Masura M [type] => select [option_value] => Array ( [0] => Array ( [product_option_value_id] => 34 [option_value_id] => 58 [name] => Rosu [price] => [price_prefix] => + ) ) [required] => 0 ) )
,我发现自己在试图显示所有的[名]从这个数组的值丢失。
我所试图做的是填充下拉表单基于第一级[name]
(如[name] => Masura S
),然后第二个下拉与第二级[name]
(如[name] => Alb
)选择选择。
,如果您有任何指针我将不胜感激......
您正在使用PHP,正确吗? – 2011-06-12 07:18:57
是的,PHP,你是对的! – RePho 2011-06-12 07:20:30
在这两个表之间使用类似'name'字段的'union'查询应该为您提供一个更好的形成数组来处理,其中一个别名/自定义字段指示基于表源的级别。你尝试过那样的事吗? – 2011-06-12 07:35:24