Print data from wordpress sql query

Okay, it’s not a simple array but a multi level array, so you can not simply use <?php echo $video->link; ?>. It wont print anything because $video array does not have any child item named link but link is the item of a child array.

So if you are certain that you only need to get link value of first child array then use this.

<?php echo $video[0]->link; ?>

But if your array has more child arrays and you want to return values of each then you can run a foreach loop.

foreach ( $video as $key => $vid ) {
    echo $vid->link;
}