My name is Svetoslav Marinov, which has short forms such as Slavi and Svetlio. I am originally from Bulgaria, Europe. Currently, I live in Ontario, Canada and I am working as a Web Developer. With my blog I want to share my knowledge and exchange ideas. Svetoslav is a DZone MVB and is not an employee of DZone and has posted 12 posts at DZone. You can read more from them at their website. View Full User Profile

How to use Zend Framework's formCheckbox View Helper

  • submit to reddit
I am almost always going back to check the syntax of  formCheckbox Zend Framework View Help so I decided to post it here.
<?php echo $this->formCheckbox('data[enabled]', 1, null, array(1, 0)); ?>
<?php echo $this->formCheckbox('data[enabled]', 1, !empty($this->data['enabled']) ? array('checked' => 1) : null); ?>
Published at DZone with permission of Svetoslav Marinov, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)