Re: PHP 4.0 Bug #8860 Updated: variable array not working
| From: | Wico de Leeuw | Date: | Tue, 23 Jan 2001 15:39:00 +0000 |
| Subject: | Re: PHP 4.0 Bug #8860 Updated: variable array not working | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-44817@lists.php.net to get a copy of this message | ||
At 15:20 23-1-01 +0000, cynic@php.net wrote:
ID: 8860 Updated by: cynic Reported By: wico@cnh.nl Status: Open Bug Type: Scripting Engine problem Assigned To: Comments: ah, sorry, should've read the report more carefully.So what should it echo? three or Grrr? i think three Greetz, Wico
Previous Comments: --------------------------------------------------------------------------- [2001-01-23 10:07:21] wico@cnh.nl changed status --------------------------------------------------------------------------- [2001-01-23 10:06:24] wico@cnh.nl 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] cynic@php.net 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. --------------------------------------------------------------------------- [2001-01-23 09:57:18] wico@cnh.nl according to Zeev this should work: $test = Array("one","two","three","four"); $var = 'test[2]'; echo $$var; /* should echo "three" */ But with it doesn't Greetz, Wico --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8860 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net