Home Forums ACF PRO Show lowest value Reply To: Show lowest value

  • thank you for your answer :),

    But it doesn’t return what I wish. I just edit my code to explain precisly; may be it will be cleaner:

    <?php if (have_rows('formule')) {
    					  while (have_rows('formule')) {
    						echo '<br />';
    						$value = get_sub_field('prix_de_la_formule');
    						$count = count($value); // count number of values in the page
    						if ($count = 1) {
    						  echo $value; // get the value
    						elseif  ($count > 1) {
    						  echo 'from .$lowestValue. to .$hightestValue' ;  // get "the lowest value"
    					  }  // end while have rows
    					} // end if have_rows ?>

    It’s not working of course.
    With this one “$value” return a loop repeating the only one value, it’s not what I want.

    For lowest and hightest value, it’s not the same prices all the time (depends formula), so I wish make something picking up the values (in table mabe be ?) and compare all of them to display lowest and hightest from the results