PHP Classes

Calculate Min/Max for price range

Recommend this page to a friend!

      PHP Create Price Range  >  All threads  >  Calculate Min/Max for price range  >  (Un) Subscribe thread alerts  
Subject:Calculate Min/Max for price range
Summary:Calculate Min/Max for price range
Messages:2
Author:Andrew Male
Date:2018-02-16 13:47:47
 

  1. Calculate Min/Max for price range   Reply   Report abuse  
Picture of Andrew Male Andrew Male - 2018-02-16 13:47:47
Looking this over, it appears this requires someone to provide a pre-sorted range of prices to the class? Wouldn't it be better to ensure the sorting inside the class so there can't be any problems with accessing the prices?

  2. Re: Calculate Min/Max for price range   Reply   Report abuse  
Picture of Mauricio Cunha Mauricio Cunha - 2018-03-20 19:31:36 - In reply to message 1 from Andrew Male
This version doesn't a previous input, only you need to pass the array of prices, the class do the work considering the limits of the array