note 40504 added to language.variables.predefined

From: Date: Fri, 05 Mar 2004 17:32:03 +0000
Subject: note 40504 added to language.variables.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-66308@lists.php.net to get a copy of this message
i was recently doing work on a system wher i did not have access to php.ini or could not set a .htaccess and the owner had a set of scrpts which was based on post variables being created by default so my option was to come up with a way to declare them all the solution was remarkably easy but i thought id shareit using the foreach and variable variables together foreach($_POST as $key => $value) $$key =$value; this could als be done for any array note: only good for php > 4 because foreach was not available before then ---- Manual Page -- http://www.php.net/manual/en/language.variables.predefined.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40504 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40504&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40504&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66308) next »