Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php find lowest value in associative array

<?php

$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.

$ageArray = array_column($a, 'age');
echo min($ageArray);
Comment

PREVIOUS NEXT
Code Example
Php :: laravel collection implode 
Php :: laravel create migration view 
Php :: laravel make model and migration 
Php :: php get prameter 
Php :: codeigniter set timezone 
Php :: php uuid generator 
Php :: drupal 9 enable PHP errors 
Php :: php get files in folder 
Php :: codeigniter where_not_in 
Php :: laravel vendor:publish not working 
Php :: php regex string start 
Php :: get_posts term 
Php :: errno: 150 foreign key constraint is incorrectly formed laravel 8 
Php :: php date month italian 
Php :: Redirect image attachment pages in Wordpress 
Php :: php executable not found visual studio code ubuntu 
Php :: php favicon 
Php :: php mongodb get all documents 
Php :: laravel clear cache 
Php :: codeigniter query builder order by 
Php :: strlen php 
Php :: laravel create migration add column 
Php :: how to declar a variable in php 
Php :: php pass variable to anonymous function 
Php :: php convert hex to rgba 
Php :: how to search in sentence laravel 
Php :: woocommerce search form <?php get_search_form(); ? 
Php :: deleteall in cakephp 
Php :: php keep only letters and numbers 
Php :: php get values that exist in both arrays 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =