Re: [PHP] How to use a variable variable with an array [solved]

2011-12-14 Thread Nils Leideck
Dear Robert, On 14.12.2011, at 22:02, Robert Cummings wrote: > $path = ‘/path/to/data/in/my/arbitrarily/deep/array/'; > $array = $someBigFatArray; > $focus = &$array; > foreach( explode( '/', $path ) as $step ) > { > if ($step === '' || $step === 'CONFIGURATION’) > { > continue; >

Re: [PHP] How to use a variable variable with an array

2011-12-14 Thread Nils Leideck
Hi FeIn and Laruence, On 14.12.2011, at 09:47, Nils Leideck wrote: >> function coolFunction( array $array, $search, $separator = ‘###' ) >> { > [...] >> if ( isset( $array[$dimension] ) ) { >> // no more dimensions to search >> if ( empty( $dime

[PHP] How to use a variable variable with an array

2011-12-13 Thread Nils Leideck
Hi Al, many thanks for your feedback. Unfortunately I don’t know the deepness of the array so I can’t use the nested foreach() idea :-( Let me try to simplify my question (which also helps myself to clarify my process ;-) I have a variable where the value is a string that is exactly the path to

[PHP] Re: How to use a variable variable in an array walk?

2011-12-13 Thread Nils Leideck
Anyone?:-( is my description too unclear? On 11.12.2011, at 11:25, Nils Leideck wrote: > this is my first post to the PHP general list. > I have an issue with a variable variable > (http://php.net/manual/en/language.variables.variable.php) > > My use case: > > I

[PHP] How to use a variable variable in an array walk?

2011-12-11 Thread Nils Leideck
Dear list, this is my first post to the PHP general list. I have an issue with a variable variable (http://php.net/manual/en/language.variables.variable.php) My use case: I have an array called $myArray. The structure is as following: array(1) { ["user_interface"]=> array(1) { ["desig