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
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 few
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
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
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
Hello,
When should i
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.
--
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) {
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 = mysql_query($query);
$type = mysql_result($result,0,type);
print
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
9 matches
Mail list logo