• 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 loop a tree array with unknown depth and get array blocks?

Class AppHttpControllersUserController Does Not Exist

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

How do I call Validator from a namespace with an already existing Validator class

Alert message after submitting form in PHP

Access denied for user 'homestead'@'localhost' (using password: YES)

api response laravel doesn't show

Symfony there are no commands defined in the "make" namespace

generate an Excel file using PHP

Symfony redirect if already loggedin from login page

Currently Using CodeIgniter Framework i have an Error

Substitute integers and dots with regex [duplicate]

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

Execute only one time and then wait set period of time before executing again

file_get_contents() without "Http" to access external URL [closed]

About Contact Privacy policy Terms and conditions