Date: 06/09/01
- Next message: Peter Bowyer: "Re: [phplib] Template Problems"
- Previous message: RPfeif123 <email protected>: "[phplib] (Kein Thema)"
- Maybe in reply to: RPfeif123 <email protected>: "[phplib] (Kein Thema)"
- Next in thread: Stephen Woodbridge: "Re: [phplib] (Kein Thema)"
- Reply: Stephen Woodbridge: "Re: [phplib] (Kein Thema)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
> I tried to do:
> $ObjTyp1 = array('"%Ein%"' , '"%Doppel%"');
> $string1 = implode(" or ", $ObjTyp1);
> <input type=radio name="ObjArt" value="Wohn" <? echo (mysql_result($result,0,
> "ObjArt")==$string1)?"checked":""; ?>>Wohnhäuser</td>
>
> and it doesn't work,
>
> but when I do:
>
> <input type=radio name="ObjArt" value="Wohn" <? echo (mysql_result($result,0,
> "ObjArt")== "%Ein%" or "%Doppel%" )?"checked":"";?>>Wohnhäuser</td>
>
They are not the same. Look at where the quotes are.
(mysql_result($result,0, "ObjArt")== "%Ein%" or "%Doppel%" )
is always true. You are using the low precedence operator
"or", so PHP runs it as:
((mysql_result($result,0, "ObjArt")== "%Ein%")
or
"%Doppel%" )
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Peter Bowyer: "Re: [phplib] Template Problems"
- Previous message: RPfeif123 <email protected>: "[phplib] (Kein Thema)"
- Maybe in reply to: RPfeif123 <email protected>: "[phplib] (Kein Thema)"
- Next in thread: Stephen Woodbridge: "Re: [phplib] (Kein Thema)"
- Reply: Stephen Woodbridge: "Re: [phplib] (Kein Thema)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

