RE: [PHP] comparisons

2002-03-22 Thread Rick Emery
ahhhinteresting. thank you for the clarification I stand humbled, head bowed... rick -Original Message- From: Andrey Hristov [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 8:03 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: [PHP] comparisons >From the docs : N

Re: [PHP] comparisons

2002-03-22 Thread Andrey Hristov
MAIL PROTECTED]>; "Rick Emery" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, March 22, 2002 3:58 PM Subject: RE: [PHP] comparisons > Andrey, you are incorrect. > > From the manual on strpos(): > int strpos (string haystack, string needle [, int offs

RE: [PHP] comparisons

2002-03-22 Thread Rick Emery
AIL PROTECTED] Subject: Re: [PHP] comparisons > if (ereg("john",$jeff) ) { } > ok > or: > > if( strstr( $jeff, "john") ) { } > ok > or: > > if( strpos( $jeff, "john") ) { } error if (strpos($jeff, "john") !== FALSE) Best rega

Re: [PHP] comparisons

2002-03-22 Thread Andrey Hristov
> if (ereg("john",$jeff) ) { } > ok > or: > > if( strstr( $jeff, "john") ) { } > ok > or: > > if( strpos( $jeff, "john") ) { } error if (strpos($jeff, "john") !== FALSE) Best regards, Andrey Hristov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

RE: [PHP] comparisons

2002-03-22 Thread Rick Emery
we aims to please... -Original Message- From: J W W L (Warwick) Berg [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 7:45 AM To: 'Rick Emery' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] comparisons Hey thanks Rick Appreciate it. Regards.. Warwick Berg -Origin

RE: [PHP] comparisons

2002-03-22 Thread Rick Emery
if (ereg("john",$jeff) ) { } or: if( strstr( $jeff, "john") ) { } or: if( strpos( $jeff, "john") ) { } -Original Message- From: Warwick Berg [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 6:55 AM To: [EMAIL PROTECTED] Subject: [PHP] comparison

[PHP] comparisons

2002-03-22 Thread Warwick Berg
Hi Just learning php from the bottom. Can someone help with syntax please? Want to know about using ifs : If the string value "john" is present in the variable "jeff" then do, etc, etc. How do we see if a value is present in a string? Thanks Warwick -- PHP General Mailing List (http://www

Re: [PHP] comparisons

2001-02-12 Thread Christian Reiniger
On Monday 12 February 2001 10:41, PHPBeginner.com wrote: > I'm having a rather strange problem. I'm trying to compare two > values. "01" and "1". The variables names that they are submitted > under are pick1 and pick2. i use the following code [...] > I still get the error. Anyone have a

RE: [PHP] comparisons

2001-02-12 Thread PHPBeginner.com
1 3:48 AM To: [EMAIL PROTECTED] Subject: [PHP] comparisons Hello, I'm having a rather strange problem. I'm trying to compare two values. "01" and "1". The variables names that they are submitted under are pick1 and pick2. i use the following code $mypick1 = st

Re: Re: [PHP] comparisons

2001-02-11 Thread Curtis Maurand
> that will work, but I prefer > Can I also write that like the following? > > if (!strcmp($pick1,$pick2)) > { >perform some action; > } Thanks. That works for me. Curtis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: Re: [PHP] comparisons

2001-02-11 Thread Phil Driscoll
Can I also write that like the following? if (strcmp($pick1,$pick2) == 0) { perform some action; } that will work, but I prefer Can I also write that like the following? if (!strcmp($pick1,$pick2)) { perform some action; } Cheers Phil -- PHP General Mailing List (http://www.php.net

Re: [PHP] comparisons

2001-02-11 Thread Curtis Maurand
: "Phil Driscoll" <[EMAIL PROTECTED]> To: "Curtis Maurand" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, February 11, 2001 2:34 PM Subject: Re: [PHP] comparisons > In spite of yor best efforts here, PHP converts the string values to numbers (because th

Re: [PHP] comparisons

2001-02-11 Thread Phil Driscoll
if equal. Cheers Reply Header Subject:[PHP] comparisons Author: "Curtis Maurand" <[EMAIL PROTECTED]> Date:Sun, 11 Feb 2001 18:47:31 + Hello, I'm having a rather strange problem. I'm trying to compare two va

[PHP] comparisons

2001-02-11 Thread Curtis Maurand
Hello, I'm having a rather strange problem. I'm trying to compare two values. "01" and "1". The variables names that they are submitted under are pick1 and pick2. i use the following code $mypick1 = strval($pick1); $mypick2 = strval($pick2); I then perform the following comparison: if