Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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



33.7k
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' => ''
));

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' => ''
));