• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to remove white space in select 2

phpjqueryajax


PHP Snippet 1:

$imei = $row["IMEI_MX"];
$imeiserial = explode(',', $imei);

echo '<select id="tags" name="imei" disabled class="form-control" onchange="getCount()" multiple>';

foreach($imeiserial as $is){
    $wew = trim($is);

    if (!empty($wew)) {
        echo "<option value='$wew'>$wew</option>";
    }
}
echo '</select>';

PHP Snippet 2:

<option value='867637026628082, 867637026628090'>867637026628082</option>

PHP Snippet 3:

<option value='867637026628082'>867637026628082</option>

Related Snippets

args[max_input] woocommerce if statement confused

Don't show recurring price for WooCommerce subscriptions worth 0$

Require a class from another class - php

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

Symfony - "framework.test" config is not set to true

How to edit Records using CodeIgniter

Update Order custom Field value with WooCommerce REST API

How to install php_imagick on wamp64

Prevent blank space in pdf pages (DomPdf)

Laravel query builder binding parameters more than once

AJAX call fails with SyntaxError: Unexpected end of JSON input

What is my SQL missing?

Update Total in checkout of Woocommerce with Ajax Request

Populate Dynamic Dropdowns List in Codeigniter

Last order would be re-order in wooCommerce. How is it possible?

About Contact Privacy policy Terms and conditions