-1

嗨,我有一个数组,输出如下:

Array
(
    [0] => Array
        (
            [cat1_id] => 1
            [sub_cat1_id] => 1065
            [b_subcat_name] => Asian
        )

    [1] => Array
        (
            [cat3_id] => 1
            [sub_cat3_id] => 1011
            [b_subcat_name] => Barbeque
        )

)

我正在使用 for 循环来输出这些数据,但是我怎样才能获取sub_cat1_idsub_cat2_id命名以在 html 上输出?谢谢

4

1 回答 1

1

您必须在循环内循环并获取 keyName

            foreach($UpperLoop as $l1)
              foreach($l1 as $l2)
                 { here you will get the key Name }
于 2013-04-04T11:03:43.587 回答