I have a PHP multidimensional array on a WP site that I'm trying to get a single value from. I looked at other solutions on here, but can't seem to get them to work. Wondering what I'm doing wrong.
Here's my code, I'm trying to get the post title out of the first entry (for example):
<?php echo $array[0]['furniture_item']['post_title']; ?>
It just breaks the page and nothing else past it loads.
Here's the array:
Array
(
[0] => Array
(
[furniture_item] => WP_Post Object
(
[ID] => 585
[post_title] => C4
)
)
[1] => Array
(
[furniture_item] => WP_Post Object
(
[ID] => 619
[post_title] => L2
)
)
[2] => Array
(
[furniture_item] => WP_Post Object
(
[ID] => 195
[post_title] => C1
)
)
[3] => Array
(
[furniture_item] => WP_Post Object
(
[ID] => 600
[post_title] => C10
)
)
)
$array[0]['furniture_item']is an object not an array$array[0]['furniture_item']->post_title