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 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 && 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] 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 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". 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. 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. Link to comment https://forums.phpfreaks.com/topic/16846-simple-question/#findComment-71115 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.