Search Results

Search found 3 results on 1 pages for 'vbklv'.

Page 1/1 | 1 

  • [PHP] How to pass array as multiple parameters to function?

    - by vbklv
    I have a parameters array: $params[1] = 'param1'; $params[2] = 'param2'; $params[3] = 'param3'; ... $params[N] = 'paramN'; I have a caller to various functions: $method->$function( $params ); How can I parse the $params array, so multiple (and unlimited) parameters can be passed to any function: $method->$function( $param[1], $param[2], ..., $param[N] );

    Read the article

  • [PHP] How to unset object's inherited properties ?

    - by vbklv
    I have an Object ( [id] => 1 [parent_id] => 0 [result:Database:private] => [db:Database:private] => mysqli Object ( [affected_rows] => 0 ... ) ) Obviously, the Object has inherited the 'db' and 'result' properties of the parent Database class. unset($object-result) nor unset($object-result:Database) nor unset($object-result:Database:private) work. How could I unset those properties when they are no longer needed (i.e. when the object properties are about to be output)? Is it a generally a good idea to have a database object as an inherited property of other classes (extend one Database class with all other classes that use database connections)?

    Read the article

1