Re: [PHP] string comparison

2008-07-13 Thread dg
On Jul 13, 2008, at 9:17 AM, Sudhakar wrote: hi i am writing a small application where a user enters a phrase in the textfield and i would like to display all the files present in the root directory which consists of the keyword or keywords entered by the user. i have used a few comparis

Re: [PHP] string comparison

2008-07-13 Thread Robert Cummings
On Sun, 2008-07-13 at 21:47 +0530, Sudhakar wrote: > hi > > i am writing a small application where a user enters a phrase in the > textfield and i would like to display all the files present in the root > directory which consists of the keyword or keywords entered by the user. > > i have used a f

[PHP] string comparison

2008-07-13 Thread Sudhakar
hi i am writing a small application where a user enters a phrase in the textfield and i would like to display all the files present in the root directory which consists of the keyword or keywords entered by the user. i have used a few comparison functions but i am not getting the expected result.

RE: [PHP] string comparison

2002-07-27 Thread John Holmes
Strcmp() is case sensitive. So use it when you need a case sensitive comparison. ---John Holmes... > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Saturday, July 27, 2002 12:35 PM > To: PHP General > Subject: [PHP] string comparison >

[PHP] string comparison

2002-07-27 Thread Bas Jobsen
Hello, When should i prefer strcmp() above == or !=? I have test it out (see code below). But a == comparison seems to be faster always. First i thought is was cause, if(strcmp($1,$2)!=0), needs two comparisons (strcmp and !=). But even if($1!=$2) is faster then if(strcmp($1,$2)). Thanks, Bas

[PHP] String comparison...

2002-05-13 Thread Robert Cummings
Anyone know of a function for comparing two strings and (if God answers my prayer for sweet features) which can trigger a user defined function for the start and end of each block of text not found in the other?? If not maybe I'll write an extension addition myself :) cheers, Rob. -- .--

Re: [PHP] String Comparison

2001-07-24 Thread Phil Driscoll
On Tuesday 24 July 2001 23:59, Jason Bell wrote: > if (image/pjpeg == $type) { print "Type is JPG"; }; > you need to put image/jpeg in quotes. Ideally you would also do a safer string comparison than == eg if(!strcmp('image/jpeg',$type)) -- Phil Driscoll -- PHP General Mailing List (http://www

Re: [PHP] String Comparison

2001-07-24 Thread Jason Bell
IL PROTECTED]> Sent: Tuesday, July 24, 2001 3:59 PM Subject: [PHP] String Comparison Hello. I'm trying to compare two strings, and performa function if the are the same. Easy right? I thought so until I tried it... $query = "select type from images where id=$id"; $result =

[PHP] String Comparison

2001-07-24 Thread Jason Bell
Hello. I'm trying to compare two strings, and performa function if the are the same. Easy right? I thought so until I tried it... $query = "select type from images where id=$id"; $result = mysql_query($query); $type = mysql_result($result,0,"type"); print $type; if (image/pjpeg == $type) {