• 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

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

Laravel Passport - Not able to get token string in response?

Send same name multiple checkbox values via ajax

How to get AJAX to post on second page?

PHP array_filter with arguments

Custom add to cart button URL for specific product in WooCommerce?

How to send parameters in soap request in php in __soapcall() function

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Correctly determine if date string is a valid date in that format

How to edit Records using CodeIgniter

Laravel csrf token mismatch for ajax POST Request

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

selected value from the listbox in php

How to create custom authentication in laravel 8?

About Contact Privacy policy Terms and conditions