Danny620 Posted August 23, 2009 Share Posted August 23, 2009 this is my code and when i run it i get echo " <tr> <td width=\"279\"><div align=\"center\">$battle[username]</div></td> <td width=\"206\"><div align=\"center\">if($battle[clan] == 'false'){ echo 'Not In One';}else{ echo $battle[clan]; }</div></td> <td width=\"55\"><div align=\"center\"> <a href=\"profile.php?profile=".$battle[username]."\">attack</a></div></td> <td width=\"68\"><div align=\"center\">$battle[wins]</div></td> <td width=\"68\"><div align=\"center\">$battle[lose]</div></td> </tr> "; this Username Alliance Attack Wins Loses josh if(false == 'false'){ echo 'Not In One';}else{ echo false; } attack 25 0 jess if(rush == 'false'){ echo 'Not In One';}else{ echo rush; } attack 0 2 Daniel if(rush == 'false'){ echo 'Not In One';}else{ echo rush; } attack 0 1 Dannyada if(rush == 'false'){ echo 'Not In One';}else{ echo rush; } attack 0 0 deaef if(rush == 'false'){ echo 'Not In One';}else{ echo rush; } attack 0 0 Link to comment https://forums.phpfreaks.com/topic/171543-weird/ Share on other sites More sharing options...
rascle Posted August 23, 2009 Share Posted August 23, 2009 That is because you are echoing the whole text use this: echo " <tr> <td width=\"279\"><div align=\"center\">".$battle[username]."</div></td> <td width=\"206\"><div align=\"center\">"; if($battle[clan] == 'false'){ echo 'Not In One'; } else{ echo $battle[clan]; } echo"</div></td> <td width=\"55\"><div align=\"center\"> <a href=\"profile.php?profile=".$battle[username]."\">attack</a></div></td> <td width=\"68\"><div align=\"center\">".$battle[wins]."</div></td> <td width=\"68\"><div align=\"center\">".$battle[lose]."</div></td> </tr> "; That should work Link to comment https://forums.phpfreaks.com/topic/171543-weird/#findComment-904635 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.