RE: [PHP] Has element of array been initialized?

From: Date: Tue, 08 Apr 2003 23:29:22 +0000
Subject: RE: [PHP] Has element of array been initialized?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142974@lists.php.net to get a copy of this message
bool array_key_exists ( mixed key, array search); If(array_key_exists($index, $seq)).... John -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-----Original Message----- >From: Ben Edwards [mailto:ben@videonetwork.org] >Sent: Tuesday, April 08, 2003 7:05 PM >To: php-general@lists.php.net >Subject: [PHP] Has element of array been initialized? > > >I am trying to see if elements of a number indexed array are set, i.e. >something like:- > >if ( isset( $seq[$index]) ) { > echo $seq[$index]."<br>"; >} > >Except in this case isset gives an error. How do i 'ask' if >the element >has been initialized? > >Ben > > >**************************************************************** >* Ben Edwards Tel +44 (0)117 968 2602 ICQ 42000477 * >* Critical Site Builder http://www.criticaldistribution.com * >* online collaborative web authoring content management system * >* Get alt news/views films online http://www.cultureshop.org * >* i-Contact Progressive Video http://www.videonetwork.org * >* Fun corporate graphics http://www.subvertise.org * >* Bristol Indymedia http://bristol.indymedia.org * >* Bristol's radical news >http://www.bristle.org.uk * >**************************************************************** >

« previous php.general (#142974) next »