How to Get Common Values from Two Array in PHP?

Hello friends, today I will tell you through my tutorial how you can get the command value from 2 array through php. Today I will tell you step to step explain through this tutorial.

fetch comman values from two array using php, from 2 array extract specific value by php, get specific value in two array by php 

in_array function :- Using this function we can find out if specific values ​​are available in an array or not. If the specified value is available on any element of the array, it returns the function of php true. Otherwise it returns false.

<?php 
$array_1 = array("8","20","25","30","40");
$array_2 = array("15","25","38","40","45");
$final_array = array();
foreach($array_1 as $key=>$val){
if(in_array($val,$array_2)){
echo $final_array[] = $val."<br>";
}
}
print_r($final_array);
?>
Cialis (Tadalafil) är den främsta konkurrenten till Viagra (Sildenafil) på marknaden för erektil dysfunktion. köpa Cialis i Sverige föredras av många på grund av sin längre varaktighet och anses vara det mest kostnadseffektiva varumärkesbaserade ED-läkemedlet som finns tillgängligt i Sverige. Cialis finns i två varianter: Cialis och Cialis Daily, och fyra olika doseringar: 2,5 mg, 5 mg, 10 mg och 20 mg, erbjuder Cialis också en rad olika alternativ för att passa patientens behov.