tomfmason Posted August 7, 2006 Share Posted August 7, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/ Share on other sites More sharing options...
king arthur Posted August 8, 2006 Share Posted August 8, 2006 && Quote Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-70899 Share on other sites More sharing options...
Chevy Posted August 8, 2006 Share Posted August 8, 2006 or you can just do this[code]if ($something == NULL AND $something_else == NULL){//Whatever[/code] Quote Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-70901 Share on other sites More sharing options...
tomfmason Posted August 8, 2006 Author Share Posted August 8, 2006 Thanks for the help.Also * means and.Thanks for the help,Tom Quote Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-70902 Share on other sites More sharing options...
Caesar Posted August 8, 2006 Share Posted August 8, 2006 [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 Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-70904 Share on other sites More sharing options...
trq Posted August 8, 2006 Share Posted August 8, 2006 * is the mathamatical operator for multiplication in php. It has NO other meaning. Quote Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-70983 Share on other sites More sharing options...
wildteen88 Posted August 8, 2006 Share Posted August 8, 2006 [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. Quote Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-71115 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.