• 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

Encrypt in php and decrypt in Dart(flutter)

PHP array slice from position + attempt to return fixed number of items

Apply filter array/return terms

How to separate letters and digits from a string in php

using random function but it's displaying duplicates

What is my SQL missing?

How to override header set in Apache config with more specific header in a virtual host

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

Store multiple fields in JSON column (Nova CMS)

How to install PHP composer inside a docker container

How do I upload a laravel project on cPanel shared hosting?

Combine array with same value and add other [duplicate]

Popup Window and PHP form

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

About Contact Privacy policy Terms and conditions