• 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 pass security cloudflare server with php curl

How do I do HTTP basic authentication using Guzzle?

How to insert Google Adsense Code in PHP script?

Custom API and cunsuming in php?

Load a .env file with PHP

Sum column values from multiple arrays

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

Symfony Mercure "Failed to send an update"

Utf8 encoding issue with Laravel

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

How to use PHPCBF to fix one issue at a time?

Composer fails with kylekatarnls/update-helper on new homestead

Can't call javascript alert alertify library from PHP

mysql_result is defined but mysql_free_result warns it expected a resource

ORA-12546: TNS:permission denied error connection to remote oracle server

About Contact Privacy policy Terms and conditions