Here's my problem i have two arrays , one is multi dimensional array the second one is single array, these arrays is displayed in a two table. the multi-array is display in table 1 and single is in table 2. what i want to do is to count the number of employees for each position.
<?php include_once('fake_db.php'); ?>
<h3>Department List</h3>
<table class="table table-condensed table-striped table-bordered table-hover no-margin">
<thead>
<tr>
<td>Name</td><td>Number of Employees</td><td>Action</td>
</tr>
</thead>
<?php foreach($positions as $key => $value){ ?>
<tr>
<td><?= $value; ?></td>
<td></td>
<td><a href="profile.php?id=<?= $key; ?>">View Employee List</a></td>
</tr>
<?php } ?>
</table>
fake_db.php
$employees = array
(
array("name" => 'Jason Alipala', "employee_id" => 'G1001-05', "position" => 1),
array("name" => 'Bryann Revina', "employee_id" => 'G1009-03', "position" => 2),
array("name" => 'Jeniel Mangahis', "employee_id" => 'G1009-04', "position" => 2),
array("name" => 'Arjay Bussala', "employee_id" => 'G1009-05', "position" => 3),
array("name" => 'Ronnel Ines', "employee_id" => 'G1002-06', "position" => 3)
);
$positions = array(1 => 'TL', 2 => 'Programmer', 3 => 'Converter');