Re: [PHP] IF with multiple values for a variable

2007-06-14 Thread Jochem Maas
Robert Cummings wrote: > On Thu, 2007-06-14 at 12:12 +0200, Jochem Maas wrote: >> Robert Cummings wrote: >>> On Wed, 2007-06-13 at 13:57 -0400, [EMAIL PROTECTED] wrote: double pipes constitutes an "OR" operation. You can use the keyword OR as well. Also, && and AND are the same as we

Re: [PHP] IF with multiple values for a variable

2007-06-14 Thread Robert Cummings
On Thu, 2007-06-14 at 12:12 +0200, Jochem Maas wrote: > Robert Cummings wrote: > > On Wed, 2007-06-13 at 13:57 -0400, [EMAIL PROTECTED] wrote: > >> double pipes constitutes an "OR" operation. You can use the keyword OR > >> as well. Also, && and AND are the same as well. > >> > >> http://us.ph

Re: [PHP] IF with multiple values for a variable

2007-06-14 Thread Jochem Maas
Robert Cummings wrote: > On Wed, 2007-06-13 at 13:57 -0400, [EMAIL PROTECTED] wrote: >> double pipes constitutes an "OR" operation. You can use the keyword OR as >> well. Also, && and AND are the same as well. >> >> http://us.php.net/manual/en/language.operators.logical.php > > They aren't ex

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Stut
Dan Shirah wrote: if ($type == 'T','D','L' { $get_id.=" payment_request WHERE id = '$payment_id'"; } if (in_array($type, array('T', 'D', 'L'))) { ... } -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:35 pm, Dan Shirah wrote: > Okay, I know this has got to be easy but it's not working any way I > try it. > > When a record is selected it opens up a new page. My query will > display the > specific results based on the type of record selected. There can be > multiple va

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:57 -0400, [EMAIL PROTECTED] wrote: > double pipes constitutes an "OR" operation. You can use the keyword OR as > well. Also, && and AND are the same as well. > > http://us.php.net/manual/en/language.operators.logical.php They aren't exactly the same. Make sure and re

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread tg-php
double pipes constitutes an "OR" operation. You can use the keyword OR as well. Also, && and AND are the same as well. http://us.php.net/manual/en/language.operators.logical.php -TG = = = Original message = = = Excellent! Double pipes to seperate possible multiple variable values. Thank

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread tg-php
Could try something like this: $types = array('T', 'D', 'L'); if (in_array($type, $types)) { // do something } But that's going to just check to see if $type is one of the valid types you're looking for. You might try something like switch. switch ($type) { case 'T': // Output 'T' rec

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Dan Shirah
Excellent! Double pipes to seperate possible multiple variable values. Thanks Daniel! On 6/13/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 6/13/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > Okay, I know this has got to be easy but it's not working any way I try it. > > When a record is sele

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Daniel Brown
On 6/13/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I know this has got to be easy but it's not working any way I try it. When a record is selected it opens up a new page. My query will display the specific results based on the type of record selected. There can be multiple values in each