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
Try something like this:
foreach($dataPoints as $point) { if (!isset($x) || $point['x'] > $x) { $x = $point['x']; } if (!isset($y) || $point['y'] > $y) { $y = $point['y']; } }