Below I have some code that I am trying to fix within the stuff I have colored red..
before I had the code like this if(($i == 4 || $i == 5 ) && !mysql_numrows($ssresult)){
and the $i == 4 and $i == 5 represent when a game goes into overtime and are only displayed if the game goes that far
$i == 4 is 1st Overtime and $i == 5 is 2nd overtime.
recently i had a game go into 3rd overtime but the code i originally had didn't allow for me to display that when the game went that far so i tried adding in $i == 6 for 3rd overtime and with the code below that is red it only shows the 1st overtime and 3rd overtime and skips the 2nd overtime..
been trying different things but not getting the right combo...also been looking at this thread http://php.net/manual/en/control-structures.if.php
$player_scores = array();
$teams_scores = array(0, 0);
for($i=1;$i<=6;$i++){
$ssresult = mysql_query("SELECT * FROM `goalinfo` WHERE gameid = '" . $id . "' AND goalperiod = '" . $i . "' ORDER BY goaltime");
if($ssresult){
$test_ss = 1;
[SIZE=4][/SIZE][COLOR="#FF0000"]if(($i == 4 || $i == 5 || $i == 6) && !mysql_numrows($ssresult)){[/COLOR]
$test_ss = 0;
}
if($test_ss == 1)
{
switch($i){
case 1:$periodname = "1ST";break;
case 2:$periodname = "2ND";break;
case 3:$periodname = "3RD";break;
case 4:$periodname = "1ST OVERTIME";break;
case 5:$periodname = "2ND OVERTIME";break;
case 6:$periodname = "3RD OVERTIME";break;
}
here are different things i have tried so far
if(($i == 4 || $i == 5 || $i == 6) && !mysql_numrows($ssresult)){
or
if(($i == 4 || $i == 5) && ($i == 6) && !mysql_numrows($ssresult)){
or
if(($i == 4) || ($i == 5) || ($i == 6) && !mysql_numrows($ssresult)){
or
if(($i == 4 && $i == 5 && $i == 6) && !mysql_numrows($ssresult)){