Re: How to use a variable variable with an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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( $dimensions ) ) {
>>          return $array[$dimension];
>>      }
>>      // more dimensions to search but we can only go further if
>>      // the current dimension value is also an array
>>      if ( is_array( $array[$dimension] ) ) {
>>          return coolFunction( $array[$dimension], $dimensions[0] );
> [...]
> 
> That looks very promising! Great feedback!
> I will try this today and feedback.

The function above works pretty well for my needs, many thanks for your valuable feedback!

Cheers, Nils
-- 
http://webint.cryptonode.de / a Fractal project


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux