• 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

Symfony autowiring issues since docker update

javascript html popup window

Not able to override collapsible.js in magento 2

Make survey at laravel 5.4 and MySQL

How to insert Google Adsense Code in PHP script?

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

How to create custom authentication in laravel 8?

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

Issue saving card for customer

Laravel: Why is my variable not being set while it's in the construct function of the controller?

PHP Warning: Module already loaded in Unknown on line 0

Debugging Stripe Webhook Event

wordpress : How to specify the cause "This site can’t be reached"

How to delete old images from public folder on update using Laravel

About Contact Privacy policy Terms and conditions