Forum Moderators: coopster

Message Too Old, No Replies

&&

         

mschultem

10:49 am on Jul 12, 2007 (gmt 0)

10+ Year Member



hi,
i am working on some conditional formatting.

<? if ($version=="a1" && choice=="Choice1"){echo"<B>105</B>";}else{echo"105";}?>

so in case of a1+Choice1 the '105' formatting should be bold, in all other cases not bold.

what i get is: both, one time bold, one time not bold next to each other ...

any ideas why this is?

thanks
m

tomda

11:06 am on Jul 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep!

Change "choice" by "$choice"

<? if ($version=="a1" && $choice=="Choice1"){echo"<B>105</B>";}else{echo"105";}?>

mschultem

11:09 am on Jul 12, 2007 (gmt 0)

10+ Year Member



ups typo
of course with $choice
result is still the same - 105 twice

tomda

11:15 am on Jul 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



result is still the same - 105 twice

Is this a joke? I though results should bold or not bold only? :)

Anyway, to know what's going on, just do
<?php
if ($version=="a1" && $choice=="Choice1"){
echo "".$version."-".$choice."-<B>105</B>";
}else{
echo "".$version."-".$choice."-105";
}
?>

mschultem

11:22 am on Jul 12, 2007 (gmt 0)

10+ Year Member



bold and not bold that is the question ;-)

thanks for the code snip - that helped to figure it out. it was actually a second if-statement in the them table cell ... Argh ...

thanks again!
m