Hi all,
I've run into a bit of a problem, I'm producing some stats based on a football/soccer league table.
I'm determining an individuals last ten results to output a form guide Won, Lost, Drawn, etc.
However i would like to take this form and add up the equivalent points total for the last ten games.
I am determining how to show my WLD record using the following part, which works great and i've now added in a points equivalent for each result.
if ($scores_list['user_id_1_score'] > $scores_list['user_id_2_score'] && $scores_list['user_id_1'] == $imageleader['LINK']) {
$win = 'W';
$pts = '3'; }
elseif ($scores_list['user_id_1_score'] > $scores_list['user_id_2_score'] && ($scores_list['user_id_2'] == $imageleader['LINK'])) {
$win = 'L';
$pts = '0';}
elseif ($scores_list['user_id_1_score'] == $scores_list['user_id_2_score'] && ($scores_list['user_id_1'] == $imageleader['LINK'])) {
$win = 'D';
$pts = '1';}
elseif ($scores_list['user_id_1_score'] == $scores_list['user_id_2_score'] && ($scores_list['user_id_2'] == $imageleader['LINK'])) {
$win = 'D';
$pts = '1';}
elseif ($scores_list['user_id_1_score'] < $scores_list['user_id_2_score'] && ($scores_list['user_id_2'] == $imageleader['LINK'])) {
$win = 'W';
$pts = '3';}
elseif ($scores_list['user_id_1_score'] < $scores_list['user_id_2_score'] && ($scores_list['user_id_1'] == $imageleader['LINK'])) {
$win = 'L';
$pts = '0'; }
If i output the $pts i see the last ten games points equivalent, e.g. 3310013300
What i need to be able to do is get the total of these figures? Can it be done?
Thanks