• 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

How to modify CSS in a specific page of the WP admin dashboard (backend)

Artisan, creating tables in database

How to make a array inside array?

Sum column values from multiple arrays

Where do I need to place a hook for phpunit?

MISSING UPDATES FOR: MEDIA Drupal 9

How to add a custom field to all Woocommerce attribute terms using add_action

how can I set a session variable in Drupal 8 and get it in a php script?

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Submitting a form with ajax in Wordpress

Make Shipping Method fields Mandatory on Woocommerce checkout page

PHP password_verify

Add custom text under order details on WooCommerce My account view order pages

file_put_content...fail to open stream:Permission denied in Laravel 5

How to create a scheduler application in php

About Contact Privacy policy Terms and conditions