Forum Moderators: coopster

Message Too Old, No Replies

help with select statement

         

adammc

12:09 am on Jun 26, 2006 (gmt 0)

10+ Year Member



Hi Guys,

Can anyone possibly tell me, how would I do the "OR" in the code below?

if ($size1?OR? $size2?OR?$size3?OR?$size4?OR?$size5?OR?$size6 >= 1) {

echo "<input type='submit' value='add to cart' name='B1' STYLE='font-size:8pt; background-color:000000; color:CCCCCC'> ";
}
else {
echo "(not in stock)";
}

eeek

12:39 am on Jun 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If ($size1>0 ¦¦ $size2>0 ¦¦ $size3>0)

adammc

1:02 am on Jun 26, 2006 (gmt 0)

10+ Year Member



Hi Eeek, thanks for the reply.

I got an error using that:
Parse error: parse error, unexpected T_STRING

if ($size6>0 ¦¦ $size7>0 ¦¦ $size8>0 ¦¦ $size9>0 ¦¦ $size10>0 ¦¦ $size11>0)
{
echo "<input type='submit' value='add to cart' name='B1' STYLE='font-size:8pt; background-color:000000; color:CCCCCC'> ";
}
else {
echo "(not in stock)";
}

eeek

1:45 am on Jun 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That one took me a few. The ¦ character you are using isn't the real (i.e. ASCII) vertical bar character.

adammc

1:50 am on Jun 26, 2006 (gmt 0)

10+ Year Member



Now dont I feel silly LOL
Thanks for that ;)

jatar_k

5:27 am on Jun 26, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



all pipe chars must be replaced with real pipe chars when pasting code from WebmasterWorld

it is done deliberately