problem:

__ construct( $something ... variable argument list ){
    parent::__construct( ??? );
}

I tried with func_get_args, but the problem is that it gives an indexed
array back.

lets say the argument list is mixed like this:
( "string", "string", array)

func_get_args will give this
[0] => "string"
[1] => "string"
[2] => array

the parent constructor works also with the func:_get_args function in ordfer
to handle variable argument lists

if u pass the array from func_get_args the parent constructor will reveive
after his func_get_args the following

array( [0] => array( [0] => "string" [1] =>"string" [2] => array( ....)

ok no problem so far. I thought just strip the key column of the array with
a function like this

function stripFirstColumn( $_fromThisArray ){
    $b = "";
    $_b = array();
    foreach( $_fromThisArray as $value){
      if( !is_array($value) ){
 if( empty( $b )){
   $b = $value;
   //   $_b[$b]="";
 } else {
   $_b[$b]=$value;
   $b = "";
 }
      } else {
 array_push($_b, $value);  or $_b[] = $value;
      }
    }
    return $_b;
}

BUT this results in an arry like this

array( "string", "string", [0] => array( ...))

HOWEVER u can create a propper array for this purpose by writing this :

$_a = array( "string", "string", Array( "string" => "string",
"string"=>"string"));

but there is no way to create the same construction by code unless I use the
eval() function what limits me to string objects only.

im really a senior coder (since 1982) but this gives me a headace. what do u
think?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to