About 7,580,000 results
Open links in new tab
  1. php - Find highest value in multidimensional array - Stack Overflow

    Apr 20, 2017 · You can init it with "$max= ~PHP_INT_MAX;" Check the basics of finding the min number. The other option is to init it with first member of array –

  2. PHP Get Highest Value in Multidimensional Array - Tuts Make

    Dec 2, 2022 · In this tutorial guide, we will show you some built-in PHP functions to find or get the maximum value from a multidimensional array.

  3. How to Find the Largest Element in an Array in PHP?

    Jul 31, 2024 · Below are the approaches to find the largest element in an array in PHP: The max () function is a built-in PHP function that returns the largest value from an array or a set of …

  4. How to Find the Maximum 'Total' Value in a Multidimensional Array in PHP?

    Nov 11, 2024 · Fortunately, PHP 5.5 introduced the array_column() function, which simplifies the retrieval of values for a specific key across multiple array elements. By combining this function …

  5. php - Get the maximum value from an element in a multidimensional array ...

    Jul 8, 2016 · Alternatively you could use array_reduce(): $max = array_reduce($arr, 'max_dnum', -9999999); function max_denum($v, $w) { return max($v, $w->dnum); } In PHP 5.3+ you can …

  6. PHP to find the maximum value in an array - Amazing Algorithms

    You can pass any type of array to the max() function, including numeric arrays, associative arrays, or multidimensional arrays. If you have a multidimensional array, the max() function will …

  7. How to get highest value from multidimensional array using PHP

    Feb 5, 2019 · Many times we need to find the max/min value of a particular key from an multidimensional array Below are the function through which we can get these values.

  8. PHP - Find min/max in a multidimensional array - DevAsking

    Nov 30, 2021 · In this blog, I will show how to get minimum and maximum value from an aaray in php. "min ()" function returns the lowest value from that array. If at least two parameters are …

  9. PHP Program to Find the Maximum Element in a Matrix

    Mar 19, 2024 · Given a matrix, the task is to find the maximum element of the matrix (arrays of arrays) in PHP. Finding the maximum element in a matrix is a common task that involves …

  10. How to get the maximum value of an array in PHP?

    You can use the built-in max function in PHP to find the maximum value of an array. The max function takes one or more parameters and returns the highest value among them. For …

  11. Some results have been removed
Refresh