On Fri, Jul 11, 2003 at 02:21:42PM -0400, Phil Powell wrote: > > $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', > 'hasSelectedProfile', ... > $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', > 'profilememberid'); > $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', > 'favebands', ... > $profileNonFormVarArray = array('profileName', 'letter', 'name'); > $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', > 'profileNonFormVarArray'); > > Bluntly put, I need to get: > $hasSelectedLetter > $letter
What exactly are you hoping to get out of this? What's suposed to be the eventual content of the $hasSelectedLetter variable? Are these really how the arrays get set up, or is it really more like: $booleanNonFormVars = array( 'hasSelectedLetter' => 'somevalue', 'hasEnteredProfile' => 'anothervalue', ... ); ? If so, you could take advantage of the fact that this is an interpreted language, and do something like this: foreach ($booleanNonFormVars as $key => $value) ${$key} = $value; foreach ($booleanVars as $key => $value) ${$key} = $value; foreach ($profileVarArray as $key => $value) ${$key} = $value; etc. Alternately, if $booleanNonFormVars are things for which you're just trying to test existence, you could: foreach ($booleanNonFormVars as $value) ${$value} = true; foreach ($booleanVars as $value) ${$value} = true; Is either of these approaches what you're after? -- Paul Chvostek <[EMAIL PROTECTED]> it.canada http://www.it.ca/ Free PHP web hosting! http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php