• 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 can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Laravel csrf token mismatch for ajax POST Request

Add bold text and line break into Laravel Notification Email

Unit (real unit test) of test laravel relationship

Laravel 5 issue with wherePivot

Getting public posts of a random user from Facebook API

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

PHPUnit (Phar) Fatal Error Only When Test Fails

Can we define variables in `.tpl` files?

Laravel get user data with profile

Auto increment id JSON

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

how to hide previous markers when new markers added in google map javascript api

I'm trying to use curl with php but getting this error:Could not resolve host: Bearer

cakephp save drag and drop list order to database

About Contact Privacy policy Terms and conditions