note 70855 added to language.variables.variable
| From: | mikeq at osu1 dot php dot net | Date: | Wed, 01 Nov 2006 09:44:35 +0000 |
| Subject: | note 70855 added to language.variables.variable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119282@lists.php.net to get a copy of this message | ||
Regarding the last post about accessing an array key within a variable variable. The answer is at
the bottom of the original help text.
In your example you would do
print ${$superGlobal}['Name'];
This would get you the value from the $_POST array without the need to define another local
variable.
----
Server IP: 83.138.144.80
Probable Submitter: 212.137.45.109 (proxied: 1.0 ENTERPRISE11, 1.1
e320_Govan.strathclyde.pnn.police.uk)
----
Manual Page -- http://www.php.net/manual/en/language.variables.variable.php
Edit -- https://master.php.net/note/edit/70855
Del: integrated -- https://master.php.net/note/delete/70855/integrated
Del: useless -- https://master.php.net/note/delete/70855/useless
Del: bad code -- https://master.php.net/note/delete/70855/bad+code
Del: spam -- https://master.php.net/note/delete/70855/spam
Del: non-english -- https://master.php.net/note/delete/70855/non-english
Del: in docs -- https://master.php.net/note/delete/70855/in+docs
Del: other reasons-- https://master.php.net/note/delete/70855
Reject -- https://master.php.net/note/reject/70855
Search -- https://master.php.net/manage/user-notes.php