min and max in multidimensional-array

后端 未结 7 471
深忆病人
深忆病人 2020-12-02 00:44

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         


        
7条回答
  •  眼角桃花
    2020-12-02 01:11

    Sample code to built your required answer

    foreach($dataPoints[0]['x'] as $x_val)
    {
    //write max min func for x values
    }
    
    foreach($dataPoints[0]['y'] as $y_val)
    {
    //write max min func for y values
    }
    

提交回复
热议问题