RE: [SOAP] Anything wrong with "in_array"

From: Date: Mon, 21 Jul 2003 15:04:46 +0000
Subject: RE: [SOAP] Anything wrong with "in_array"
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-865@lists.php.net to get a copy of this message
Declare the array (wherever it first comes into existence). $myArray = array(); Or you could split the if condition which checks "is_array" into a separate line which declares it if necessary. > -----Original Message----- > From: Yuan.Yang [mailto:Yuan.Yang@newcastle.ac.uk] > Sent: Monday, July 21, 2003 10:32 AM > To: Alok K. Dhir; soap@lists.php.net; Yang > Subject: RE: [SOAP] Anything wrong with "in_array" > > > It looks working. > However, if i want to add sth into array, and > it's not array at that time, how could i add it? > > E.g.: > > $myArray; > > if(is_array($myArray)) //add item; > > > cheers! > > Yang > > > >===== Original Message From "Alok K. Dhir" > <adhir@symplicity.com> ===== > >You try something like: > > > >if (is_array($returnedArray) && !in_array($data,$returnedArray)) > > > >Al > > > > > > > -- > PHP Soap Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.soap (#865) next »