Jump to content

[SOLVED] Changing colours for echo


SirChick

Recommended Posts

if($ResultQuote = '$100')
{
echo '<font style="font-size:16px" color="green" face="Arial">';
echo $ResultQuote;
echo '</font></div>';
}else if($ResultQuote = '$200')
{
echo '<font style="font-size:16px" color="yellow" face="Arial">';
echo $ResultQuote;
echo '</font></div>';
}else if($ResultQuote = '$300')
{
echo '<font style="font-size:16px" color="red" face="Arial">';
echo $ResultQuote;
echo '</font></div>';
}

aye i was just about to say lol!

 

 

But can you do it with captions?

 

<?

if($ResultQuote == 'Result: You search the train station from top to bottom and find $1!')

{

echo '<font style="font-size:16px" color="green" face="Arial">';

echo $ResultQuote;

echo '</font></div>';

}else if($ResultQuote == 'You failed to find any money, better try some other time!')

{

echo '<font style="font-size:16px" color="red" face="Arial">';

echo $ResultQuote;

echo '</font></div>';

}else if($ResultQuote == 'Result: You search the train station from top to bottom and find $3!')

{

echo '<font style="font-size:16px" color="green" face="Arial">';

echo $ResultQuote;

echo '</font></div>';

}else if($ResultQuote == 'Result: You search the train station from top to bottom and find $5!')

{

echo '<font style="font-size:16px" color="green" face="Arial">';

echo $ResultQuote;

echo '</font></div>';

}

?>

 

 

this is what i put.. but it just displays nothing.. ?

 

the $ResultQuote is created in an include else where... just encase you wondered why i compare them to strings

hmm it doesnt echo it. good spot. gah that is rediculously annoying lol so many lines to look through *cries* lol

 

 

would any one care to take a look ? i cant post it here though way too much to post and im not comfortable posting my work too everyone :/

change

else if($ResultQuote == 'Result: You search the train station from top to bottom and find $5!')
{
echo '<font style="font-size:16px" color="green" face="Arial">';
echo $ResultQuote;
echo '</font></div>';
}

to

else if($ResultQuote == 'Result: You search the train station from top to bottom and find $5!')
{
echo '<font style="font-size:16px" color="green" face="Arial">';
echo $ResultQuote;
echo '</font></div>';
}else
{
echo 'none of those';
echo $ResultQuote;
}

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.