Only echo item in foreach with highest value [closed]
Technically, this is more of a general PHP question rather than a WordPress question which should be on Stack Overflow instead. To echo only the highest value from your array, try storing your items ($s[1]) into an array instead and then use max(). Something like this: $args = array( ‘post_type’ => array(‘product’), ‘posts_per_page’ => -1 … Read more