0

I want insert 2 arrays with a single id and which is my view file

 <div class="form-group">
            <label class="col-lg-2 control-label">Fee Types</label>
            <div class="col-lg-8">
            <div class="checkbox">
            <?php foreach($types as $key=>$value){?> 
                <label>
                    <input type="checkbox"  value="<?php echo $value['id'] ?>"  name="type_id[]" />
                    <span class="text"><?php echo $value['name'] ?></span>
                </label>
                <input type="text"  class="form-control"  name="files[]" />
                <?php } ?>
            </div>
            </div>
        </div>

1 Answer 1

1

Controller *guidelines

$type_id = $this->input->post('type_id')

foreach($type_id as $key => $val) {
    $data_array(
         'type_id' = $val;
    );
    $this->user->details($data_array);
}
Sign up to request clarification or add additional context in comments.

1 Comment

what did you mean ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.