This is what I got, UPDATED
$avg_query = "SELECT AVG(rating) AS avg_rating FROM kicks WHERE userid='$userid'";
$avg_result = mysqli_query($cxn, $avg_query) or die("Couldn't execute query.");
$row = mysqli_fetch_assoc($avg_result);
$average = $row['avg_rating'];
Every time I echo it out, it always returns array. Never used this function before, but i don't understand why it would do that.