1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <?php
// Déclaration de la matrice
$matrice1 = array();
$matrice1[0] = array('','a','b','c');
$matrice1[1] = array('a','1','O','2');
$matrice1[2] = array('b','O','5','0');
$matrice1[3] = array('c','O','5','0');
$matrice2 = array();
$matrice2[0] = array('','b','c');
$matrice2[1] = array('b','0','2');
$matrice2[2] = array('c','5','0');
//* afficher le tableau//
echo '<pre>';
print_r($matrice1);
echo '</pre>';
$result = array_intersect ($matrice1[0], $matrice2[0]);
print_r($result);
?> |
Partager