hey all
i have created a table with randon numbers in it and i now want to display the frequency of the numbers generated.
i believe the array_count_value function is what i need but i have no idea how to apply it to the query result.
ie i know how to do a query and then display the result (using a for loop and mysql_fetch_array function) but cannot nut out how to use the count value function.
ie
$query = "select * from draws";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo"Number of rows found: ".$num_results."<br><br>";
//displays the query
for($i=0; $i<$num_results; $i++){
$row = mysql_fetch_array($result);
$i = $i + 1;
echo "Row No.:".$i ." : ";
$i = $i - 1;
echo @$row["one"].", ";
echo @$row["two"].", ";
echo @$row["three"].", ";
echo @$row["four"].", ";
echo @$row["five"].", ";
echo @$row["six"];
echo"<br>";
}
any pointers will be great
big thanks in advance