Re: [PHP] Extracting Array value as variable

2001-05-07 Thread Jason Stechschulte
On Fri, May 04, 2001 at 08:08:11PM -0400, John McConnell wrote: > 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 >

Re: [PHP] Extracting Array value as variable

2001-05-04 Thread John McConnell
ct: Re: [PHP] Extracting Array value as variable > > > An example : > > > $array = array('a' => 'apple', > 'b' => 'banana', > 'c' => 'cranberry'); > > > print $array['a']; // apple > pri

Re: [PHP] Extracting Array value as variable

2001-05-04 Thread Philip Olson
An example : 'apple', 'b' => 'banana', 'c' => 'cranberry'); print $array['a']; // apple print $array['b']; // banana extract($array); print $a;// apple print $b;// banana $var = 'array'; print

[PHP] Extracting Array value as variable

2001-05-04 Thread John McConnell
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