Jump to content

Archived

This topic is now archived and is closed to further replies.

tomfmason

simple question

Recommended Posts

I feel stupid for having to ask this but you know what they say
[quote author=I have no idea]The only stupid question is the one left unasked[/quote]

Anyways, How can I say and in php. That may not make sense but here is or
[code=php:0]
if ($something || $something_else == "whatever") {
    //do something
}[/code]

So what I want to do is if something and something_else == whatever

Thanks,
Tom

Share this post


Link to post
Share on other sites
or you can just do this

[code]
if ($something == NULL AND $something_else == NULL){
//Whatever
[/code]

Share this post


Link to post
Share on other sites
Thanks for the help.

Also * means and.

Thanks for the help,
Tom

Share this post


Link to post
Share on other sites
[quote author=tomfmason link=topic=103344.msg411456#msg411456 date=1154995955]

Also * means and.

[/quote]

I must be misreading this because, "*" definitely does not mean "and". It means "all".

Share this post


Link to post
Share on other sites
* is the mathamatical operator for multiplication in php. It has NO other meaning.

Share this post


Link to post
Share on other sites
[quote author=Caesar link=topic=103344.msg411458#msg411458 date=1154996521]
[quote author=tomfmason link=topic=103344.msg411456#msg411456 date=1154995955]
Also * means and.
[/quote]

I must be misreading this because, "*" definitely does not mean "and". It means "all".
[/quote]
If you are using it in a mysql query then yes, but not in PHP.

Read thropes post for the meaning of the * operator in PHP.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.