Jump to content

How to I put an If(){} into an else{}?


Dethman

Recommended Posts

Any help on this would be awsome....

if($spy*12>=$row['covertLVL']*$row['covertTroops']){
	$troops=number_format($row['untrainedTroops']+$row['attackTroops']+$row['defenseTroops']+$row['covertTroops']);
	$Naquadah=number_format($row['Naquadah']);
	}else{
	$troops="??????";
	$Naquadah = "??????";
	}
		$page.="
		<Tr align='center'>
		<td align=left><A href='stats.php?id=".$row['userid']."'>".$row['username']."</a>" // THE  IF STATEMENT NEEDED HERE IS BELOW
if($user['PPT'>=1]{echo"<font color="yellow">UnderPPT</font>"})".$tag."</td>
		<td>".number_format($row['overallRank'])."
		<td align=left>".$alliancename."</td>
		<td>".$troops."</td>
		<td>".$Naquadah."</td>
		<Td width=1% align=center><A href=msg.php?id=".$row['userid']."><img src='images/pm.jpg' border=0></a>
		</tr>
		";	
	}
	return $page;
}
}

 

Thanx Dethman

Link to comment
https://forums.phpfreaks.com/topic/87743-how-to-i-put-an-if-into-an-else/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.