/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] How do I find the highest value in an array?

Hi
I have created an array with integers in it.
I now need to extract the highest value from the array.
Is there a way to do it.
I have looked all the way through the array bit of the manual and Ii annot find anything that refers to the higest value.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@Wisest_GuySep 14.2006 — sort($Array);

BiggestNumber = $Array[0];
Copy linkTweet thisAlerts:
@postedoverseasauthorSep 14.2006 — Ha Har, elementary my dear watson.

I really ought to think about some of these before I post on here, I am quite inexperienced when it comes to arrays.

Thanks Wisest Guy, appreciate it
×

Success!

Help @postedoverseas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...