I am currently struggling to compare two arrays.
The first array ($allRoepnummerArray) contains all the callnumbers available.
The second array ($occupiedRoepnummers) contains the call numbers that are occupied.
At the moment I am unable to compare them.
I would like to have the available call numbers in a table.
$allRoepnummerArray = array(
'22-101',
'22-102',
'22-103',
'22-104',
'22-105',
'22-106',
'22-107',
'22-108',
'22-109',
'22-110',
'22-111',
'22-112',
'22-113',
'22-114',
'22-115',
'22-116',
'22-117',
'22-118',
'22-119',
'22-120',
'22-121',
'22-122',
'22-123',
'22-124',
'22-125',
'22-126',
'22-127',
'22-128',
'22-129',
'22-130',
);
$occupiedRoepnummers = array();
foreach ($roepnummerResults as $roepnummerKey => $roepnummerValue) {
array_push($occupiedRoepnummers, $roepnummerValue['roepnummer']);
}
foreach($allRoepnummerArray as $allRoepnummer) {
foreach($occupiedRoepnummers as $occupiedRoepnummer) {
if ($allRoepnummer != $occupiedRoepnummer) {
echo '<th>'.$allRoepnummer.'</th>';
}
}
}
?>