FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » AND in the if statement
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: AND in the if statement [message #171464 is a reply to message #171234] Wed, 05 January 2011 01:18 Go to previous message
spambait is currently offline  spambait
Messages: 35
Registered: September 2010
Karma:
Member
In article <1cqz2sz54ke4v$(dot)dlg(at)evanplatt(dot)sux>, richard <member(at)newsguy(dot)com> wrote:
> Ok smart people, answer me this as I have not yet found an answer googling.

"Give me a fish!"

No. I'm not going to give you a fish. Below are some links that might help you
learn to fish.
>
> if (a=1) echo "hello";
>
> In BASIC, I can say, if a=1 AND b=2 then do this.
> Meaning, both conditions MUST be true to get to "do this".

http://www.php.net/manual/en/language.operators.assignment.php
http://www.php.net/manual/en/language.operators.comparison.php
>
> Is it possible to include AND in the PHP if and if so, how?

Yes.
http://www.php.net/manual/en/language.operators.logical.php
>
> Maybe like, if (a=1 and b=2) echo "hello";

Maybe something similar to that. RTFM [*] and learn something.

[* RTFM = Read The Fishing Manual, of course.]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: php-debug-faq-post in progress
Next Topic: using same variable twice on same page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 21:15:25 GMT 2024

Total time taken to generate the page: 0.05036 seconds