$web="SELECT SUM(`rate`) / COUNT(`rate`) from `rate`"; $tuto=mysql_query($web) or die('Database error: ' . mysql_error()); $mas=mysql_fetch_array($tuto); echo"The Rating of this tutorial is : ".$mas['rate']."<br><br>";
SELECT SUM(`rate`) / COUNT(`rate`) AS average_rate from `rate`
Refer to the alias average_rate in your PHP code, i.e. $mas['average_rate'].
This is why we ask you to be more specific; the query xenon provided by example works fine as-is in MySQL, but not if you want to return the value in PHP.
I would also suggest, if you're retrieving only one column from a resultset, use mysql_result() instead of one of the mysql_fetch_* functions. You don't need an array, there is only a single row and single column result output.