Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-08-2002, 12:46 AM   PM User | #1
Gil
New Coder

 
Join Date: Jul 2002
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Gil is an unknown quantity at this point
or in php

Hi,

Is there a equivalent to or in php?

Thanks,
Gil
Gil is offline   Reply With Quote
Old 08-08-2002, 01:10 AM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,222
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Or or ||


http://www.php.net/manual/en/languag...rs.logical.php
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 08-08-2002, 09:41 PM   PM User | #3
Gil
New Coder

 
Join Date: Jul 2002
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Gil is an unknown quantity at this point
Thanks a lot,

I'm reading. Can you help me for now with the following please:

if ($choise1 == "b" && $choise6 =="1" | | $choise6 =="2" | | $choise6 =="3" && $choise7 =="b" | | $choise7 =="c" | | $choise7 =="d" && $choise8 == "1" && $choise9 == "b")
{
$page = ("1b123bcd1bcd.php");
}

This doesn't work. Can you tell me how to use | | the proper way and make the above code work?

Thanks a lot!

Gil
Gil is offline   Reply With Quote
Old 08-09-2002, 08:37 AM   PM User | #4
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
You have to tell us what you want to achieve, doesn't work is just a to minimal error description. Although I have a feeling you want to check out parentheses to structure the evaluation order...

if ( ($choise1 == "b" && $choise6 =="1") | | ($choise6 =="2") etc.
mordred is offline   Reply With Quote
Old 08-09-2002, 08:40 AM   PM User | #5
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,222
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
Yes your order of operations is incorrect. Check out the operator precedence and such at the link I posted.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 08-09-2002, 10:33 AM   PM User | #6
Ökii
Regular Coder

 
Join Date: Jun 2002
Location: UK
Posts: 577
Thanks: 0
Thanked 0 Times in 0 Posts
Ökii is an unknown quantity at this point
You might also like to remove the space from between the bars.

|| not | |
__________________
Ökii - formerly pootergeist
teckis - take your time and it'll save you time.
Ökii is offline   Reply With Quote
Old 08-12-2002, 05:51 PM   PM User | #7
Gil
New Coder

 
Join Date: Jul 2002
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Gil is an unknown quantity at this point
Thanks a lot everybody.

Mordred: I needed to know the syntax as you showed me,

Thanks,

Gil
Gil is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:55 PM.


Advertisement
Log in to turn off these ads.