• 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 pass security cloudflare server with php curl

Use Python plotly chart in PHP

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

401 Unauthorized only occurring on some pages in Laravel 8

disable two buttons after clicking another button

How to install LDAP in Docker php-fpm alpine

Uploading video to Youtube using Youtube Data API V3 and Google API Client PHP -- getting 401 (unauthorized) message

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

Laravel - How to properly generate unique slugs from article titles?

How to Display Data in Yajra Datatables Laravel 7?

Edit XML in HTML form and submit to self

Multiple order by in WooCommerce

How to programmatically find public properties of a class from inside one of it's methods

Explode not working properly with dash

php file upload scanning using clamav, permissions on /tmp/

About Contact Privacy policy Terms and conditions