CheckBox value

How to get CheckBox value? When I checked one of four checkboxes then I got value 1 but I need actual value.

<?php foreach($models as $n=>$form): ?>

<div class="simple">

<?php echo CHtml::activeLabelEx($form,‘telephone’); ?>

<?php echo CHtml::activeCheckBox($form,‘telephone’,CHtml::listData(CActiveRecord::model(‘phoneForm’)->findAll(),‘id’,‘telephone’)); ?>


<?php endforeach; ?>

CVarDumper::dump( $_POST ); see it~maybe can help you~

I got array().

I think you are searching for



I got 1 or 0 when I check but I need actual value. Is that possible?

Here is my view form. When i submit then I got Array, but I need checkbox value. Is that possible?

    &lt;?php foreach(&#036;models as &#036;n=&gt;&#036;form): ?&gt;


	&lt;td colspan=2&gt;&lt;?php echo CHtml::activeCheckBoxList(&#036;form,'personal',array('telephone','email')); ?&gt;&lt;/td&gt;


&lt;?php endforeach; ?&gt;

Sorry, but I have not the time to write some sample code atm. I hope can help you.

Yes, that is possible

In the controller, If I use this to get array value


then I see the one value. Is that any way to use for loop to get the array value