• 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 create html table in php

browsersync doesn't work with XAMPP

Best way to scrolldown onpageload

PHP usort() order in case of equality

HTTP Range requests with php for Video Embedding for solving going to specific time in video (seek bar not work)

Get sql.h error on MacOS 12 (Monterey) sqsrv and pdo_sqsrv drive installation

How to create a cookie to store the timestamp of when a page is first loaded with php

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

Require a class from another class - php

Python - Include another Python script

Wordpress 'post_type_link' hides permalink

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

PHP: PDO + CSV export not downloading (headers issue?)

Clear javascript source cache laravel 5.8

Reducing authentication calls on external API (Laravel 5.6)

About Contact Privacy policy Terms and conditions