Return number in array that is greater than X
问题 The following code automagically finds the highest price on a page: $vw_link = get_field('shop_link'); $ch = curl_init($vw_link); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $cl = curl_exec($ch); $dom = new DOMDocument(); @$dom->loadHTML($cl); $xpath = new DOMXpath($dom); $price = $xpath->query("//span[@class='price']"); foreach($price as $value) { $vw_array[] = floatval(str_replace('$', '', $value->nodeValue)); update_field('shop_price',max($vw_array)); } What would be the best thing