We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Error: Wrong number of parameters. Phalcon\Tag::Select

Hi!.

I'm new in phalcon. I want to load a select with data from a table.

In the view i have this:

echo Phalcon\Tag::Select('lugar_nac', Ciudades::find(), array(
        'using' => array('id_ciudad', 'ciudad'),
        'useEmpty' => true,
        'emptyText' => '...',
        'emptyValue' => ''
));

show me: Wrong number of parameters



34.6k
Accepted
answer
edited Aug '15

You have to pass the parameters in an array:

echo Phalcon\Tag::Select(array(
        'lugar_nac', 
        Ciudades::find(),
        'using' => array('id_ciudad', 'ciudad'),
        'useEmpty' => true,
        'emptyText' => '...',
        'emptyValue' => ''
));


1.6k

Thanks!! it works!!

You have to pass the parameters in an array:

echo Phalcon\Tag::Select(array(
       'lugar_nac', 
      Ciudades::find(),
       'using' => array('id_ciudad', 'ciudad'),
       'useEmpty' => true,
       'emptyText' => '...',
       'emptyValue' => ''
));