Is there a simpler than:
foreach ($array as $key => $value) {
if($value['date']->ID == 22) { echo $key; }
}
for searching for ID->22
(each ID
is unique) and then if it exists, return the parent key? In this case it would be key 0:
Array
(
[0] => Array
(
[date] => WP_Post Object
(
[ID] => 22
)
)
[1] => Array
(
[date] => WP_Post Object
(
[ID] => 33
)
)
)
Just curious if there is a less intensive way of doing this as it will have to be done a lot on any given page. If not, is it practical to run 700 of these loops at once?