• 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]

If you intend you use SMTP, add your SMTP Code after this Line

PHP web3 ERC20 token function call

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

How to submit the custom form data in database in WordPress without plugin using ajax?

401 Unauthorized only occurring on some pages in Laravel 8

Results page in other window

laravel controller function parameters

How to change 'users' auth table and use another instead Laravel

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

HTML + PHP + PHPMAILER

Clients authentication and user authentication with laravel

Symfony redirect if already loggedin from login page

Return multiple values from a function using mysqli_fetch_assoc [closed]

Having issue with matching rows in the database using PDO

About Contact Privacy policy Terms and conditions