Extracting Array value as variable

From: Date: Sat, 05 May 2001 00:08:11 +0000
Subject: Extracting Array value as variable
Groups: php.general 
Request: Send a blank email to php-general+get-51487@lists.php.net to get a copy of this message
I have an array $veg that is set so $veg[0]="broccoi" & $veg[1]="tomatotes". I have also assigned values to the variables $broccoli=1 and $tomatoes=2. I want to print the values for those variables ($broccoli and $tomatoes) by only using the $veg array. So, if it worked it would be $$veg[0] would be 1, and $$veg[1] would be 2. Is there anyway to do this? Many thanks! John McConnell

« previous php.general (#51487) next »