Skip to content

Schools of Web – Teach Yourself Web Development and Web Designing Step by Step With Easy Explanation

Teach Yourself Web Development and Web Designing Step by Step With Easy Explanation

  • Home
  • About Us
  • Contact Us
  • Earnings Disclaimer
  • Privacy Policy
Search
Search Close
  • Home
  • PHP How-to
  • How to Find the Maximum/highest Value of an Array in PHP?

How to Find the Maximum/highest Value of an Array in PHP?

May 7, 2014May 22, 2014 Neil FinPHP How-tophp max() function example

New here? Like SchoolsOfWeb on Facebook to stay up to date with new posts.

Problem:

You want to find out the maximum value from an array.

Solution:

max() function can help you to the highest value of an Array. See the following example-

<?php
$numbers = array(77, 455, 1000);
echo max($numbers);
?>

Output:
1000

Post navigation

Previous Previous post: How to Sort an Array by Keys in PHP?
Next Next post: How to add/Insert an Element in a Specific Position in an Array using PHP?

Courses

  • PHP for Beginners
  • CSS for Beginners
  • HTML for Beginners

How-to Tutorials

  • PHP How-to
  • HTML How-to

About this site

Schools of Web is run by web developer and designer to help others learn it easily.

Like us: Never miss a post

Copyright © All rights reserved.
Education Soul by WEN Themes