Welcome Guest, Not a member yet? Register   Sign In
Explode for selected
#1

Hi all,

I have trouble on this code,

In DB "planCurrencies" = "1,2,3,4"
PHP Code:
<select class="select2" name="currency[]" style="width: 100%" multiple="multiple" data-placeholder="Choose">
    <?
php
    $cid 
explode(',',$plan->planCurrencies);
    foreach(
$this->currencies_model->get() as $c) { ?>
    <option value="<?php echo $c->ID?><?php echo $c->ID == $cid "selected":"" ?>><?php echo $c->currencyCode?></option>
    <?php ?>
</select> 

This code already show all currencies but selected currency not working,

Thanks you
Reply


Messages In This Thread
Explode for selected - by googlemy - 11-06-2017, 08:53 PM
RE: Explode for selected - by pravins - 11-06-2017, 10:43 PM
RE: Explode for selected - by googlemy - 11-06-2017, 11:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB