• 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

Laravel-fopen: failed to open stream: Permission denied

Parameter is not sent to Laravel route in Ajax

Convert regular text to array using notepad++

Show date difference as "20" instead of "20 years ago"

How to change 'users' auth table and use another instead Laravel

How to get unique slug to same post-title for other time too?

WooCommerce Subscriptions: Remove role on cancelled subscription

how to loop through json response data using ajax jquery?

PHPExcel How to set conditional formatting to change cell background color based on cells values

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

How to execute sql code based on fetch array

array_map triple dimensional array [duplicate]

How to get AJAX to post on second page?

PHP array stringify

How to add class name to an existing tag in php

About Contact Privacy policy Terms and conditions