//$feed = array_slice($feed, 0, 30); // limit the feed items to 30 if (empty($feed)) { echo "<p>There doesn't seem to be anything here, follow some users to see what they are up to!</p>"; } else { } foreach ($feed as $value) { switch ($value['type']) { case 'ac': $postID = $value['id']; $self = $value['u_id'] === $value['p_id'] ? true : false; $me = $value['p_id'] == USER_ID ? true : false; $to_self = $value['u_id'] === USER_ID ? true : false; $post_id = $value['id']; $poster_id = BASE_URL . "user/{$value['p_id']}/"; $p_count = QNA::get_votes($postID) ?: "0"; $commentsCount = $QNA->get_Qcomments($postID) ? count($QNA->get_Qcomments($postID)) : "0"; ?> <div class="ui segment activity-view"> <div class="header user-details"> <div class="ui image mini"> <a href="<?php echo $poster_id; ?> "><img src="<?php echo $value['p_path']; ?> "></a> </div> <?php if ($self) { ?>