我有這樣如何找到關聯數組的父數組索引?
Array
(
[2014-04-29] => Array
(
[2] => Array
(
[cal_icon] => remindar_images.jpg
[category_slug] => reminder
)
)
[2014-04-22] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-21] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
[4] => Array
(
[cal_icon] => travel_images.jpg
[category_slug] => travel
)
[11] => Array
(
[cal_icon] => invite.jpg
[category_slug] => invite
)
)
[2014-04-19] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-23] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
[4] => Array
(
[cal_icon] => travel_images.jpg
[category_slug] => travel
)
[7] => Array
(
[cal_icon] => restaurants_images.jpg
[category_slug] => restaurants
)
)
[2014-04-10] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-20] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-15] => Array
(
[5] => Array
(
[cal_icon] => photo_images.jpg
[category_slug] => photos
)
)
[2014-04-16] => Array
(
[5] => Array
(
[cal_icon] => photo_images.jpg
[category_slug] => photos
)
)
[2014-05-01] => Array
(
[6] => Array
(
[cal_icon] => event_images.jpg
[category_slug] => events
)
)
)
Array
(
[2014-04-29] => Array
(
[2] => Array
(
[cal_icon] => remindar_images.jpg
[category_slug] => reminder
)
)
[2014-04-22] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-21] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
[4] => Array
(
[cal_icon] => travel_images.jpg
[category_slug] => travel
)
[11] => Array
(
[cal_icon] => invite.jpg
[category_slug] => invite
)
)
[2014-04-19] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-23] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
[4] => Array
(
[cal_icon] => travel_images.jpg
[category_slug] => travel
)
[7] => Array
(
[cal_icon] => restaurants_images.jpg
[category_slug] => restaurants
)
)
[2014-04-10] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-20] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-15] => Array
(
[5] => Array
(
[cal_icon] => photo_images.jpg
[category_slug] => photos
)
)
[2014-04-16] => Array
(
[5] => Array
(
[cal_icon] => photo_images.jpg
[category_slug] => photos
)
)
)
Array
(
[2014-04-29] => Array
(
[2] => Array
(
[cal_icon] => remindar_images.jpg
[category_slug] => reminder
)
)
[2014-04-22] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-21] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
[4] => Array
(
[cal_icon] => travel_images.jpg
[category_slug] => travel
)
[11] => Array
(
[cal_icon] => invite.jpg
[category_slug] => invite
)
)
[2014-04-19] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
)
[2014-04-23] => Array
(
[3] => Array
(
[cal_icon] => shopping_images.jpg
[category_slug] => shopping
)
[4] => Array
(
[cal_icon] => travel_images.jpg
[category_slug] => travel
)
[7] => Array
(
[cal_icon] => restaurants_images.jpg
[category_slug] => restaurants
)
)
輸出如果我有[category_slug] => travel
那麼我想all the date index that belongs to
[category_slug] => travel` 嘿我得到正確的輸出,但它不破它是未來多time.Please幫我。 我該如何做到這一點?
嘿我得到正確的輸出,但它不破它是未來多時間。如何打破它。價值不是固定時間。它可以變化。 – Muk
使用代碼中顯示的'break'。你看過演示了嗎? –
是的,我已檢查演示。我想所有的日期,在循環不僅一個,我得到所有日期,但多次。我也使用break.please幫助我 – Muk