Maybe it contains whitespaces... Have you tried:

                     if (trim($record->Subject2) == "posters")
                        {
                          echo ("PrintFormat1");
                         }
                     else
                        {
                           echo ("PrintFormat2");
                         }



--
Lasse


"Patterson Liddle" <[EMAIL PROTECTED]> wrote in message
00ac01c10967$52da3c40$ec0687d9@patlid">news:00ac01c10967$52da3c40$ec0687d9@patlid...
I wonder if someone would be kind enough to explain why,

if $record->Subject2 sometimes contains the word posters



this

echo $record->Subject2;

accurately prints the word or words in the field Subject2 from the found
record

but this


                     if ($record->Subject2 == "posters")
                        {
                          echo ("PrintFormat1");
                         }
                     else
                        {
                           echo ("PrintFormat2");
                         }

always returns PrintFormat2

(I'm trying to get the if statement to print format 1 when the field
contains posters, and format 2 if it's got anything else in it. It's never
empty.)



Apologies if you've seen this all before

---

Regards

John Patterson
Patterson Liddle
Bath

phone & fax
+44 1225 426722

[EMAIL PROTECTED]
www.pattersonliddle.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to