geocode/includes/modules/filefield/gpx.inc, line 102
- Versions
- 6
gpx_minmax($items, $return_values = false, $type = null)
Code
<?php
function gpx_minmax($items, $return_values = false, $type = null) {
$values = array();
for ($i = 0; $i < $items->length; $i++) {
$x = gpx_callbacks($items->item($i)->nodeValue, $items, $i);
if (!isset($values['min']) || ($x < $values['min'])) $values['min'] = $x;
if (!isset($values['max']) || ($x > $values['max'])) $values['max'] = $x;
if ($return_values) $values['data'][] = $x;
}
return $values;
}
?> 