|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10020 Variable variables
Submitted: 2001-03-27 09:06 UTC Modified: 2002-09-30 18:37 UTC
From: kvdwalt at csir dot co dot za Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 3.0.16 OS: nt
Private report: No CVE-ID: None
 [2001-03-27 09:06 UTC] kvdwalt at csir dot co dot za
in html

			vFormInnerHTML = vFormInnerHTML + '<INPUT TYPE=HIDDEN NAME="extractid[]" VALUE='+el.value+'>';

in serverside PHP

for ($i=0;$i < count($extractid); $i++) {
   $t = "extractid[".$i."]";
   echo $t.'<br>';  
   echo $$t.'<br>'; //$$t is empty!!

   echo $extractid[$i].'<br>';



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 18:37 UTC]
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit

Thank you for your interest in PHP.

the "variable variables" feature works on plain variable names only, there is no array resolving done

$$t is equal to $GLOBALS[$t] here
and    $GLOBALS["extractid[$i]"] 
is not $GLOBALS["extractid"][$i]
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC