📜  php 在关联数组中查找最小值 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:46.544000             🧑  作者: Mango

代码示例1
$a = [
    ['emp_id' => '1', 'name' => 'ram', 'age' => 40],
    ['emp_id' => '5', 'name' => 'ram_1', 'age' => 20],
    ['emp_id' => '2', 'name' => 'ram_2', 'age' => 30],
    ['emp_id' => '3', 'name' => 'ram_4', 'age' => 25],
    ['emp_id' => '4', 'name' => 'ram_3', 'age' => 50]

];
// please find minimum age employee in above array.

echo min($newArray);