Hmm I don't think using "selected" as the value is the solution to the exact problem here, because phptal does understand the so called binary attributes, such as selected and checked.
Seems like the '| nothing' is causing the expression to change type and display a 1 instead of being treated in above special manner (I guess phptal uses === true for this?) On 6/14/09, Scott Trevithick <sc...@trevithick.ca> wrote: > The problem is that your array associates the PHP boolean value TRUE > with the key 'isSelected'. 1 is the functional equivalent of TRUE in > many languages, hence PHPTAL gives you 1 since you specified TRUE. Use > the string 'selected' instead. > > $options = array( > array( > 'label' => 'Option1', > 'value' => 1 > ), > array( > 'label' => 'Option2', > 'value' => 2, > 'isSelected' => true > ), > array( > 'label' => 'Option1', > 'value' => 2 > ) > ); > > -- > > Scott Trevithick > sc...@trevithick.ca > 416-876-0811 > -- -- Tjerk _______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal