lundi 15 octobre 2018

How to get the value based on the selected option value

I have the following php code and get the api data from whmcs. This code returns the product name value.

<select id="ssl" class="form-control select_plan" style="width:95%">
    <option value="--Select--">--Select--</option>
        @foreach($products['products']['product'] as $key)
            @if($key['gid'] == '10')
               <option value="$key['name']">$key['name']</option>
            @endif
        @endforeach
</select>

This code returns the product price value

@foreach($products['products']['product'] as $key)
        @if($key['gid'] == '10')
            @foreach($key['pricing'] as $value)
                @if($key['name']=='Positive SSL Wildcard')
                    
                @endif
            @endforeach
        @endif
    @endforeach

If i select one product name it doesn't display the corresponding price value of the product.Please suggest any solution.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire