![]() |
|
#1
|
||||
|
||||
![]()
alright =) and one more small thing. if i have this code
Code:
if($numpets >= 50){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='http://media.giantbomb.com/media/bomb/img/achievements/trophy-bronze.png' title='Bronze Trophy'></div>"; } else if($numpets >= 200){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/silvertrophy.png' title='Silver Trophy'></div>"; } else if($numpets >= 500){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='http://media.giantbomb.com/media/bomb/img/achievements/trophy-gold.png' title='Gold Trophy'></div>"; } silver trophy if the have 200 or less and gold if 500 or more but the code i have either shows all the trophies or only if they have that exact amount =/ EDIT:: I was doing it backwards eh? Code:
if($numpets >= 500){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-gold.png' title='Gold Trophy'></div>"; } else if($numpets <=50 && $numpets <= 200){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/silvertrophy.png' title='Silver Trophy'></div>"; } else if($numpets != 50){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-bronze.png' title='Bronze Trophy'></div>"; }else{ $article_content .= ""; } second EDIT:: i think this is correct... Code:
if($numpets >= 500){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-gold.png' title='Gold Trophy'></div>"; } else if($numpets >= 200){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/silvertrophy.png' title='Silver Trophy'></div>"; } else if($numpets >= 50){ $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-bronze.png' title='Bronze Trophy'></div>"; }else{ $article_content .= ""; } Last edited by SilverDragonTears; 08-28-2011 at 02:17 AM. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Just A Few Questions: | Mousewhisper | Questions and Supports | 4 | 04-14-2012 07:05 PM |
Just some Questions i have. | rickasawr | Questions and Supports | 3 | 04-30-2011 11:04 PM |
Some Questions? :) | blondbananamix | Questions and Supports | 10 | 04-25-2011 01:47 PM |
two questions | RoconzaArt | Questions and Supports | 10 | 02-24-2011 09:15 AM |
What's New? |
What's Hot? |
What's Popular? |