laserlight wrote:Basically, you can already get the percentage you want, but you wanted it rounded to the nearest whole number. Use [man]round/man for that.
Tried to use round, number_format and a couple others but I am missing something when I use the . The page will go plank or will not change. But I take a look at it again. Also the first book u suggested, tnx. I have done alot of searching through this forum and many others, but I will continue
Trying to do the shooting percentages for individuals
Here is more of the array::
$p_array[$playerid][goals] = $p_array[$playerid][goals] + mysql_result($result_stats,$sc,"goals");
$p_array[$playerid][assists] = $p_array[$playerid][assists] + mysql_result($result_stats,$sc,"assists");
$p_array[$playerid][ties] = $p_array[$playerid][ties] + mysql_result($result_stats,$sc,"ties");
$p_array[$playerid][saves] = $p_array[$playerid][saves] + mysql_result($result_stats,$sc,"saves");
$p_array[$playerid][shutouts] = $p_array[$playerid][player_stats.shutouts] + mysql_result($result_stats,$sc,"shutouts");
$p_array[$playerid][minutes] = $p_array[$playerid][minutes] + mysql_result($result_stats,$sc,"minutes");
$p_array[$playerid][yellow] = $p_array[$playerid][yellow] + mysql_result($result_stats,$sc,"yellow");
$p_array[$playerid][red] = $p_array[$playerid][red] + mysql_result($result_stats,$sc,"red");
$p_array[$playerid][gp] = $p_array[$playerid][gp] + 1;
$p_array[$playerid][pts] = ($p_array[$playerid][goals] * $_CONF['goal']) + ($p_array[$playerid][assists] * $_CONF['assist']) + ($p_array[$playerid][ties] * $_CONF['tie']);
// FOR AVERAGES
$p_array[$playerid][pave] = ($p_array[$playerid][goals]) / ($p_array[$playerid][saves]) * 100;