hey
i like to know how i can store this result:
PHP Code:
<?php
$sql = "SELECT count(*) as cnt, rank
FROM members
GROUP BY rank";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result)) {
echo $row['rank']." = ".$row['cnt']."<br>";
}
?>
the code works nice, it give me the amounts of rank from the database for each different rank. But how can i store these results into variables instead of writing them down?
and how can i request them again? for later in the coding?
|