How to get the maximum subscript of an array in PHP, get the maximum subscript of an array_PHP tutorial

WBOY
Release: 2016-07-13 09:54:13
Original
1492 people have browsed it

How to get the maximum subscript of an array in PHP, get the maximum subscript of an array

The example in this article describes the method of getting the maximum subscript of an array in PHP. Share it with everyone for your reference. The specific implementation method is as follows:

<&#63;php
$hots = array('8213'=> 0,'8212'=> 100,'8172'=> 10008);
$key = array_search(max($hots),$hots); 
echo $key;
&#63;>
Copy after login

The running result is: 8172

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/998561.htmlTechArticleHow to get the maximum subscript of an array in PHP. Get the maximum subscript of an array. This example describes how to get the maximum value of an array in PHP. Subscript method. Share it with everyone for your reference. Specific implementation method...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!