Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8347423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:21:39+00:00 2026-06-09T07:21:39+00:00

i have an array like: Array([0]=>array(‘field1’=>aNumber,’field2’=>’something’), [1]=>array(‘field1’=>aNumber,’field2’=>’something’), [2]=>array(‘field1’=>aNumber,’field2’=>’something’), [3]=>array(‘field1’=>aNumber,’field2’=>’something’)); I have to get the

  • 0

i have an array like:

Array([0]=>array('field1'=>aNumber,'field2'=>'something'),
[1]=>array('field1'=>aNumber,'field2'=>'something'),
[2]=>array('field1'=>aNumber,'field2'=>'something'),
[3]=>array('field1'=>aNumber,'field2'=>'something'));

I have to get the index of array that has min the field aNumber..

For example:

Array([0]=>array('field1'=>10,'field2'=>'something'),
[1]=>array('field1'=>3,'field2'=>'something'),
[2]=>array('field1'=>100,'field2'=>'something'),
[3]=>array('field1'=>9,'field2'=>'something'));

the index i want is 1.

I know is possible using a loop and some if storing the iterate index.. but i want to know if there is some php function that shortens the algorithm
how can i do? thanks!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:21:40+00:00Added an answer on June 9, 2026 at 7:21 am

    As I know there is no built-in function like this.
    But you can use other functions with callbacks ..
    array_walk, array_filter

    (And a built-in function will probably do same as you will do with a loop and iterate through the items of your array)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to create specific table in PHPTAL. I have array like that: $tab
What I want to do is following. Lets say we have array like that
I have an array like: [1,2,3,4,5,6,7,8,9] And I want to get items in duets
I have an array like [1,1,1,2,4,6,3,3] and I would like to get the list
i have an array structured like: $something = array( 0 => array( 'label' =>
I have an array like that array(4) { [0]=> array(2) { [0]=> string(10) 2012-05-23
I have array like this: $path = array ( [0] => site\projects\terrace_and_balcony\mexico.jpg [1] =>
Hello i have array like this [0] => Array ( [ExamMonth] => Array (
An array is defined of assumed elements like I have array like String[] strArray
I have array result like this: Array ( [0] => stdClass Object ( [id_global_info]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.