Search
 
SCRIPT & CODE EXAMPLE
 

PHP

keep multiple values in select box after reload in php

/**
This code was pasted by ProgrammerRimon on: 2022-02-23
******/

/***
* 
* @param: multiplce selection keeping function, array1, array2: match Array, total array,
* 
*/
	function gt($a) {return gettype($a);}

	  function kpm($ma=false, $ta=fasle) {
		if(($ma&&$ta) && (gt($ma)== 'array'&& gt($ta)== 'array')) {
		 foreach ($ma as $v) {
		   $s = '';
		  if(in_array($v, $ta)) $s = 'selected'; else $s = '';
		       echo "<option $s value='$v' >$v</option>";
	       }
         }
       }
Comment

PREVIOUS NEXT
Code Example
Php :: integracao de webservice no php usando soap 
Php :: How can apply_filters be used to create a filter hook in wordpress 
Php :: woocommerce show percentage in sales badge 
Php :: Cakephp api POST request , saving data without validation 
Php :: Best Image Manipulation and Graphs tools for php 
Php :: command ui is not found 
Php :: LongestWord 
Php :: laravel livewire public property 
Php :: ReflectionException: Class "MagentoFrameworkAppHttpInterceptor" does not exist in /bitnami/magento/vendor/magento/framework/Code/Reader/ClassReader.php:34 
Php :: share with all blade in laravel 
Php :: php formula return more results 
Php :: Installation request for pokemon-tcg/pokemon-tcg-sdk-php ^1.2 - satisfiable by pokemon-tcg/pokemon-tcg-sdk-php[1.2.0] 
Php :: Natural numbers from php 
Php :: laravel eloquent where value less then 5 and greter then 0 
Php :: Code début HTML 
Php :: larqavel migration 
Php :: id de sesion php 
Php :: PHP SimpleXML Parser 
Php :: php html entity for url 
Php :: function placing bet in guide using php 
Php :: newrelic apache virtual hosts 
Php :: user ,role ,permission customize laravel application 
Php :: getting key from env returns null laravel 
Php :: $this meaning in codeigniter 
Php :: Adding another return message from Laravel Livewire 
Php :: error correction in qr code php 
Php :: eval base64 decode php 
Php :: get pivot id laravel 
Php :: yii relations 
Php :: laravel disable cors 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =