This is array I am getting by storing multiple values in a table
Array
(
[sen] => Array
(
[0] => stdClass Object
(
[id] => 1
[sen_id] => 8
[no_of_years] => 1
[no_of_leaves] => 2
)
[1] => stdClass Object
(
[id] => 2
[sen_id] => 8
[no_of_years] => 2
[no_of_leaves] => 3
)
)
)
I want to show the value of no_of_years and no_of_leaves in a form field which is like below
<div class="col-md-4">
<input type="text" name="no_of_years[]" class="form-control name_list" value="<?php echo $sen[0]->no_of_years;?>"/>
</div>
<div class="col-md-4">
<input type="text" name="no_of_leaves[]" class="form-control name_list" value="<?php echo $sen[0]->no_of_leaves;?>"/>
</div>
but its not working , How can I fix it?