<?php if(!empty($data)) { ?>
    <?php foreach($data as $post) { ?>
        <tr>
            <td class="user-post">
                <img src="<?php echo $post['picture'];?>" alt="" class="post-img">
                <span class="post-title"><?php echo strlenchar($post['message'],80);?></span>
                                        <span class="post-info">
                                            <span class="post-comments"> <i class="fa fa-comments"></i> <?php echo $post['comments'];?> </span>
                                            <span class="post-links"> <i class="fa fa-thumbs-up"></i> <?php echo $post['likes'];?> </span>
                                            <span class="post-date"> <?php echo empty($post['created']) ? '' : date('m/d/Y h:i A',strtotime($post['created']));?> </span>
                                            <a href="https://facebook.com/<?php echo $post['id'];?>" target="_blank" class="user-link"> <i class="fa fa-facebook"></i>View post </a>
                                        </span>
            </td>
            <td class="text-right">
                <a data-id="<?php echo $post['id'];?>" href="#" class="select_post btn btn-gray btn-sm"> SELECT POST <i class="fa fa-arrow-right"></i></a>
            </td>
        </tr>
    <?php } ?>
<?php } ?>