Re: String compare of 7 text strings

From: Date: Sat, 14 Aug 2004 02:15:26 +0000
Subject: Re: String compare of 7 text strings
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-193780@lists.php.net to get a copy of this message
sort ( $array ); if ( $array[ 0 ] !== $array[ count ( $array )-1 ] ) { // Not all fields in the array are the same... } On Fri, 13 Aug 2004 21:10:50 -0500 bclem@imaginative-enterprises.com (Brent Clements) wrote: > Let me rephase my question in my previous email: > > I'd like to compare 7 strings(which are in an array). Each string should be > the same, if they are not, a message should be outputted. How would one do > this outside of using a huge if/then statement? > > Thanks, > Brent > ----- Original Message ----- > From: "Brent Clements" <bclem@imaginative-enterprises.com> > To: <php-general@lists.php.net> > Sent: Friday, August 13, 2004 9:07 PM > Subject: [PHP] String compare of 7 text strings > > > I wanted to see if anyone has an easier way to do this. The end result is > this: I need to compare 7 different text strings(which are in an array). > They should all be the same, if they are not the same, a message should be > outputted saying they weren't. > > How would one do this outside of using a huge if/then statement? > > Thanks, > Brent

« previous php.general (#193780) next »