php – How to see the data in the selection box?


This is my code:

{assign var=cl_size value=","|explode:$data.cg_cloth_size}
        <div class="form-group" align="left" >

        <label for="cartsize">Select Size</label>

        <select class="form-control" style="width:150px;" name="cartsize" required>

        <option value="">Select Size</option>

        {foreach $records as $data}

        <option value="{$data.cg_cloth_size}" {$select_{$data.cg_cloth_size}} >{$data.cg_cloth_size}</option>




I want to see the record in the select box like this: abc

But problem is this data view like a, b, c in this form in select box


Could you try this?

{foreach from=$records item=data}
Scroll to Top