array functions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dannymc1983
Forum Commoner
Posts: 80
Joined: Wed Feb 16, 2005 7:24 am

array functions

Post by dannymc1983 »

if i have a array of integers how would i get the index of the biggest integer?
is there any function that does this??
for example if i have an array (1,2,3,4,3,2,1) i would need some function that tells me that the location of the biggest integer is in index 3. anyone know of a way of doing this?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

for sorting arrays, look at sort() and its sister functions..
Post Reply