Re: A problem with QuickForm
| From: | Alexey Borzov | Date: | Sun, 06 Jun 2004 11:52:47 +0000 |
| Subject: | Re: A problem with QuickForm | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12942@lists.php.net to get a copy of this message | ||
Hi!
Feroze Md. Arif wrote:
I am trying to generate forms from a database using QuickForm. I intend reading the form definition from the database and store it in an array and use call_user_func_array to pass the definition to the addElement method. I tried the following sample code, but it doesn't seem to work: $defnArray = array(button','ibtnTest','Test Button'); $methodVariable = array( $form, 'addElement' );Try: $methodVariable = array( &$form, 'addElement' );
call_user_func_array($methodVariable,$defnArray);