Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php array common element

$a = array(1, 2, 3, 4);
$b = array(4, 5, 6, 7);
$c = array_intersect($a, $b);
if (count($c) > 0) {
    var_dump($c);
    //there is at least one equal value
}
Comment

PREVIOUS NEXT
Code Example
Php :: wordpress echo the date in post 
Php :: laravel new model 
Php :: how to delete all data from table in php 
Php :: composer 
Php :: deleteall in cakephp 
Php :: store as real file name laravel uplaod 
Php :: using laravel back function on blade 
Php :: how to add title to wordpress php 
Php :: php serverpath 
Php :: raw query in laravel with parameters 
Php :: laravel blade file naming conventine 
Php :: php convert special characters to normal 
Php :: php multi type parameter php multi type parameter 
Php :: how to pass variable in inside function into where in laravel 
Php :: php find substring 
Php :: php to int 
Php :: php two decimal places 
Php :: try catch in laravel 
Php :: php permanent redirect to url 
Php :: case inside laravel query 
Php :: laravel check record exists 
Php :: Obtener datos de usuario registrado en WordPress 
Php :: get_transient wordpress 
Php :: php create zip from folder 
Php :: laravel websockets onmessage 
Php :: laravel migrate seed 
Php :: php convert array to number 
Php :: php month single digit 
Php :: laravel routing controller get and post method 
Php :: array_key_exists vs in_array 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =