• 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

Popup Window and PHP form

I want to display default profile image if user do not have profile image

JSON Render Issue in Date Object Laravel and PHP 7.4

Match single unknown parameter php (Morse-code Regex)

PHPExcel export HTML table to xlsx

Group data in a multidimensional array based on two columns

Laravel : How to Create Dropdown to Select FOREIGN KEY from Other Table?

how to remove %20 in the url in php

How to find phpcs current default standard

Access relation of pivot table in Laravel

insert multiple rows in a saveall in cakephp

How to fix this error : Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI?

Why is this PHP array not the same?

Form Validation and Submission to database

how to fix Service provider class not found when using repository?

About Contact Privacy policy Terms and conditions