Hi all.
How to merge model data with another array? For example:
//Can be static array
$vegetables = array('id' => 999, 'name' => 'Potato');
echo $this->tag->select(
array(
'productId',
Products::find("type = 'vegetables'"),
'using' => array('id', "name"),
'useEmpty' => true,
'emptyText' => 'Please, choose one...',
'emptyValue' => '@'
)
);
<select id="productId" name="productId">
<option value="@">Please, choose one..</option>
<option value="101">Tomato</option>
<option value="102">Lettuce</option>
<option value="103">Beans</option>
<option value="999">Potato</option>
</select>