hi i am trying to find min and max values of x and y how can i find this min and max functions is not working correctly
$dataPoints = array(
array(\'x\' =&g
//to find max use rsort() & for min :sort()
//Below will return you the max
$dataPoints = array(
array('x' => 2343, 'y' => 4322),
array('x' => 103, 'y' => 7303 ),
array('x' => 2345,'y' => 2321 ),
array('x' => 310, 'y' => 2044 ),
array('x' => 173, 'y' => 793 ),
array('x' => 456, 'y' => 2675),
array('x' => 24, 'y' => 819 ));
foreach ($dataPoints as $key=>$value) {
$x[$key] = $value['x'];
$y[$key] = $value['y'];
}
rsort($x,SORT_DESC);
rsort($y,SORT_DESC);
echo $x[0];
echo $y[0];