check the given array is part of the another array practical

technical talkiess
0

 <?php

// Define two array

$v1 = array('vi','sh','al','1','2','3','4');

$i1 = array('vi','2');


if(array_intersect($i1,$v1) === $i1){

echo "This is the part";

}else{

echo "This is not apart";

}

?>

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)