note 16443 added to function.extract

From: Date: Tue, 30 Oct 2001 20:12:12 +0000
Subject: note 16443 added to function.extract
Groups: php.notes 
Request: Send a blank email to php-notes+get-19618@lists.php.net to get a copy of this message
extract() rejects variables with square brackets, which means you can't take advantage of creating arrays the way you can with form fields. The following example illustrates this functionality. <? $a = array("b[1]"=>"1", "b[2]"=>"1"); print(extract($a) . " vars extracted"); print_r($b); ?> -- http://www.php.net/manual/en/function.extract.php http://master.php.net/manage/user-notes.php?action=edit+16443 http://master.php.net/manage/user-notes.php?action=delete+16443 http://master.php.net/manage/user-notes.php?action=reject+16443

« previous php.notes (#19618) next »