RE: [PEAR] A problem with QuickForm
| From: | Feroze Md. Arif | Date: | Sun, 06 Jun 2004 17:40:32 +0000 |
| Subject: | RE: [PEAR] A problem with QuickForm | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12951@lists.php.net to get a copy of this message | ||
Hi Alexey,
It works when I include the ampersand.
Thankyou!
Best Regards
Feroze
===========================
Jar Jar Binks will be Jedi!
===========================
-----Original Message-----
From: Alexey Borzov [mailto:borz_off@cs.msu.su]
Sent: Sunday, June 06, 2004 7:53 PM
To: Feroze Md. Arif
Cc: pear-general@lists.php.net
Subject: Re: [PEAR] A problem with QuickForm
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);