RE: [PHP] Array_keys problem

From: Date: Tue, 06 Apr 2004 16:25:30 +0000
Subject: RE: [PHP] Array_keys problem
Groups: php.general 
Request: Send a blank email to php-general+get-182494@lists.php.net to get a copy of this message
On 04 April 2004 01:13, Robin 'Sparky' Kopetzky wrote: > function key_exists($ps_key) > { > if ( in_array($ps_key, > array_keys($this->ma_arguments)) ) { > return true; > } else { > return false; > } > } Ummm -- function key_exists($ps_key) { return array_key_exists($ps_key, this->ma_arguments); } ? (Assuming it's passed the is_array() test, of course!) Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#182494) next »