I have this function:
function get_following($user_id) { global $conn; $stmt = $conn->prepare(\"SELECT * FROM following WHERE `follower_id`=:user\"); $
$following will have to be an array of rows. You are actually only fetching the first row. Fetch it using PDOStatement::fetchAll(), like this:
$following = $stmt->fetchAll(PDO::FETCH_ASSOC);