> -----Original Message----- > From: tedd [mailto:tedd.sperl...@gmail.com] > Sent: 22 May 2011 22:33 > > At 5:50 PM +0200 5/22/11, Nisse =?utf-8?Q?Engstr=C3=B6m?= wrote: > >On Sat, 21 May 2011 09:26:02 -0400, tedd wrote: > > > >> The function strcmp() simply evaluates two strings and reports > back > >> -1, 0, or 1 depending upon their alphabetical relationship. > > > >It might do that, but don't bet your horse on it. > > > ><http://se.php.net/manual/en/function.strcmp.php> > > > >/Nisse > > It works that way for me.
Are you absolutely certain about that? echo strcmp('These are nearly equal', 'These are almost equal'), "\n"; echo strcmp('different', 'unequal'), "\n"; echo strcmp('b', 'a'), "<br />\n"; Result: 13 -17 1 The description of the function merely says that the result is <0, 0 or >0 -- it makes no promises about the actual value when it is non-zero. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, C507 City Campus, Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom Email: m.f...@leedsmet.ac.uk Tel: +44 113 812 4730 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php