CakePhp adding label to select formhelper
cakephp, php
Solution
You can do this:
echo $this->Form->label('Format');
echo $this->Form->select('format_id', $formats, array());
or
echo $this->Form->input('format_id', array('label'=>'Format', 'type'=>'select', 'options'=>$formats));
Problem
I would like to add a label to my `select` form helper however I am not quite sure how to do this in cake v2+. This is my current code which does not work: ``` echo $this->Form->select('format_id', $formats, array('label'=>'Format:')); ```