• 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 delete old images from public folder on update using Laravel

SlimExceptionHttpNotFoundException

How can I stop a symfony process which is listening on http://127.0.0.1:8000

How update php.ini on a Mac OS X Mojave?

Laravel Displaying image from database

Getting public posts of a random user from Facebook API

How to run or debug php on Visual Studio Code (VSCode)

Add customer email and phone in "Order" column to admin orders list on Woocommerce

How to Display Data in Yajra Datatables Laravel 7?

how to prevent float variables displaying as scientific notation when printing [duplicate]

jwt decode throws Invalid argument supplied for foreach() on php-jwt and codeignitor 4

Clear javascript source cache laravel 5.8

How to Display Data in Yajra Datatables Laravel 7?

How to convert time from one timezone to another in PHP

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

About Contact Privacy policy Terms and conditions