• 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

XML to CSV with PHP converter [problem with images grabing]

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

Where do I need to place a hook for phpunit?

Google Calendar API batch request PHP

Unable to Edit config.inc.php

Lumen - Postgresql setup - Composer

Creating live search with AJAX and CodeIgniter

Magento 2 - How to add new block to admin panel in product page?

Custom post type single page not working

Additional price based on cart item count in WooCommerce

Transpose csv file data [duplicate]

How to get array values using foreach in laravel

enroll_table three field fetch to payment form to create payment field in laravel 5.5

how do i retrieve and display the alt text of an image in wordpress?

How to add a sidebar to Woocommerce Shop Page?

About Contact Privacy policy Terms and conditions