echo stripslashes($val);
        ?>
</td>
                                        <td>
                                                    <?php 
        if (count($resultShippingArray[$key])) {
            $chkCnt = 0;
            $error = 0;
            foreach ($resultShippingArray[$key] as $eachShippingArr) {
                $chkCnt++;
                $radiochecked = "";
                if ($chkCnt == 1) {
                    $radiochecked = "checked";
                }
                $serviceName = $val;
                $display_shipping_rate = ConvertUSDollorToUserCurrency($currency_attributes[2]) * $eachShippingArr['rate'];
                $display_shipping_rate = number_format($display_shipping_rate, 2, ".", "");
                if ($eachShippingArr['rate'] == '') {
                    $error++;
                    $error_message = 'Flat Rate Shipping Options Currently not available , Please contact Administrator.';
                }
                ?>
                                            <input type="radio" <?php 
                echo $radiochecked;
                ?>
 name="shipping_option_<?php 
                echo $key;
                ?>
"  class="checkbox" value="<?php 
                echo $eachShippingArr['service_name'] . "=>" . number_format($eachShippingArr['rate'], 2, ".", "");
                ?>
 public static function getShippingControlProduct($productid = 0, $productOptionId = 0, $userId = "", $destination_country = "", $destination_state = "", $destination_zip = "")
 {
     // get shipping price for product
     $resultShippingArray = clsGenerateShippingControl::getShippingPriceProduct($productid, $productOptionId, $userId, $destination_country, $destination_state, $destination_zip);
     $currency_attributes = displayCurrencyType();
     $shippingPrice = 0;
     if (count($resultShippingArray) == 0) {
         $shippingControl .= " <option value='0'>Shipping rates not available</option>";
     } else {
         //   foreach ($productArray AS $key=>$val) {
         if (count($resultShippingArray[$productOptionId]) > 0) {
             $chkCnt = 0;
             $error = 0;
             foreach ($resultShippingArray[$productOptionId] as $eachShippingArr) {
                 $chkCnt++;
                 $radiochecked = "";
                 $serviceName = $val;
                 $display_shipping_rate = ConvertUSDollorToUserCurrency($currency_attributes[2]) * $eachShippingArr['rate'];
                 $display_shipping_rate = number_format($display_shipping_rate, 2, ".", "");
                 if ($chkCnt == 1) {
                     $shippingPrice = $display_shipping_rate;
                 }
                 $value1 = $eachShippingArr['service_name'] . '=>' . number_format($eachShippingArr['rate'], 2, '.', '');
                 $shippingControl .= "<option value='" . $value1 . "'>" . $eachShippingArr['service_name'] . "&nbsp;&nbsp;" . $currency_attributes[0] . "&nbsp;" . $display_shipping_rate . "</option>";
             }
             // for each product shipping
         } else {
             $shippingControl .= " <option value='0'>Shipping rates not available</option>";
         }
     }
     $selectControl = "<select name='shipping_option_" . $productOptionId . "' id='productshipping_" . $productOptionId . "' onchange=calculateCartTotal('" . $productOptionId . "') class='chk_shipping_price' >" . $shippingControl . "</select>";
     $currentControle = array("selectControl" => $selectControl, "shipppingPrice" => $shippingPrice);
     //  $shippingControl = "<select name='shipping_option_"+$productOptionId+"' id='productshipping"+$productOptionId+"'>". $shippingControl "</select>";
     return $currentControle;
 }