• 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

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

Navigation idle on content download

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

Laravel csrf token mismatch for ajax POST Request

WooCommerce - unset "<product> removed notice…" on cart page

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

How to display MySQL table using php and edit it in a web browser

Override default Auth routes in Laravel 7

How to execute sql code based on fetch array

Show rotation of tweets using current day of month

Multiple order by in WooCommerce

PHPExcel_IOFactory::createWriter causes wrong behaviour

Laravel Excel::store file empty after stored

Submitting a form with ajax in Wordpress

Woocommerce Edit Message "An account is already registered with your email address. Please log in."

About Contact Privacy policy Terms and conditions