ID: 8860 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: linux PHP Version: 4.0.4pl1 New Comment:
you need to use eval() to make something like this unambiguous. Previous Comments: ------------------------------------------------------------------------ [2001-01-23 10:25:22] [EMAIL PROTECTED] It is definitely not meant to work this way. 'test[2]' is not a variable name. $test is the variable (array), and $test[2] is second element of the array. So it belongs to feature requests. ------------------------------------------------------------------------ [2001-01-23 10:20:59] [EMAIL PROTECTED] ah, sorry, should've read the report more carefully. ------------------------------------------------------------------------ [2001-01-23 10:07:21] [EMAIL PROTECTED] changed status ------------------------------------------------------------------------ [2001-01-23 10:06:24] [EMAIL PROTECTED] ok and that isn;t working either... althoug i liked the first more (and still think it should be that way) so this doesn't work either: $three = "Grrrr"; echo "Test"; $test = Array("one","two","three","four"); $var = 'test[2]'; echo $$var; /* should echo "three" */ ------------------------------------------------------------------------ [2001-01-23 09:59:43] [EMAIL PROTECTED] no. it will echo contents of $three. if you don't have that variable in current scope, it'll echo null, and, depending on your settings, emit a warning. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/8860 -- Edit this bug report at http://bugs.php.net/?id=8860&edit=1