You should pretty much never need to use $wpdb
to grab data. There are helper functions built into WordPress that will do what you need.
In this case, use get_post_meta()
.
Having used https://www.unserialize.com/ to unserialize your data, it looks like the item list in your question is in $meta['toys_item']['toys_item_ranger']
. I’ll use that in my code snippet to make a list like the one you’re looking for.
$meta = get_post_meta( $post_id, 'fat-mb-boat-toys', true );
if (
! empty( $meta )
&& ! empty( $meta['toys_item'] )
&& ! empty( $meta['toys_item']['toys_item_ranger'] )
) {
foreach ( $meta['toys_item']['toys_item_ranger'] as $toy ) {
echo $toy . '<br />';
}
}