Re: [PHP] Variable variables into an array.

2010-08-11 Thread Richard Quadling
On 10 August 2010 18:08, Andrew Ballard aball...@gmail.com wrote: On Tue, Aug 10, 2010 at 12:23 PM, Richard Quadling rquadl...@gmail.com wrote: On 10 August 2010 16:49, Jim Lucas li...@cmsws.com wrote: Richard Quadling wrote: Hi. Quick set of eyes needed to see what I've done wrong...

RE: [PHP] Variable variables into an array.

2010-08-11 Thread Bob McConnell
From: Richard Quadling Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... ?php $Set = array(); $Entry = 'Set[1]'; ^^ Shouldn't that be $Set[1]? $Value = 'Assigned'; $$Entry = $Value; print_r($Set); ? Bob McConnell -- PHP

Re: [PHP] Variable variables into an array.

2010-08-11 Thread Richard Quadling
On 11 August 2010 13:58, Bob McConnell r...@cbord.com wrote: From: Richard Quadling Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... ?php $Set = array(); $Entry = 'Set[1]';            ^^ Shouldn't that be $Set[1]? $Value = 'Assigned';

[PHP] Variable variables into an array.

2010-08-10 Thread Richard Quadling
Hi. Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... ?php $Set = array(); $Entry = 'Set[1]'; $Value = 'Assigned'; $$Entry = $Value; print_r($Set); ? The output is an empty array. Examining $GLOBALS, I end up with an entries ... [Set] = Array

Re: [PHP] Variable variables into an array.

2010-08-10 Thread Jim Lucas
Richard Quadling wrote: Hi. Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... ?php $Set = array(); $Entry = 'Set[1]'; $Value = 'Assigned'; $$Entry = $Value; print_r($Set); ? The output is an empty array. Examining $GLOBALS, I end up with an

Re: [PHP] Variable variables into an array.

2010-08-10 Thread Richard Quadling
On 10 August 2010 16:49, Jim Lucas li...@cmsws.com wrote: Richard Quadling wrote: Hi. Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... ?php $Set = array(); $Entry = 'Set[1]'; $Value = 'Assigned'; $$Entry = $Value; print_r($Set); ? The

Re: [PHP] Variable variables into an array.

2010-08-10 Thread Andrew Ballard
On Tue, Aug 10, 2010 at 12:23 PM, Richard Quadling rquadl...@gmail.com wrote: On 10 August 2010 16:49, Jim Lucas li...@cmsws.com wrote: Richard Quadling wrote: Hi. Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... ?php $Set = array(); $Entry