title: how to find nearest lower and upper value of sp?
body: <p>Example:</p>
  
  <pre><code>Array
  (
  [0] =&gt; stdClass Object
      (
          [Big] =&gt; 1.32
          [FAN_MODEL] =&gt; AFPV3G-500-2800
          [FAN_DIA] =&gt; 500
          [FAN_RPM] =&gt; 2800
          [FAN_SERIES_NAME] =&gt; AFPV3G
          [BigVALUE] =&gt; 26.00
          [FAN_CMH] =&gt; 10000
          [BigPEAK_POWER] =&gt; 800.00
          [Bigoutlet_velocity] =&gt; 14.15
          [velocity_pressure] =&gt; 12.253
          [Bigtotal_velocity] =&gt; 13.57
          [SP1] =&gt; 8
          [SP2] =&gt; 5
          [SP3] =&gt; 7
          [SP4] =&gt; 7
          [SP5] =&gt; 7
          [SP6] =&gt; 7
          [SP7] =&gt; 7
          [SP8] =&gt; 7
          [SP9] =&gt; 7
          [SP10] =&gt; 7
          [Bigtotal_eff] =&gt; 0.33
          [static_eff] =&gt; 0.03
          [BigBKW] =&gt; 1.120
      )
  
  [1] =&gt; stdClass Object
      (
          [STATIC_PRESSURE] =&gt; 0.34
          [FAN_DIA] =&gt; 630
          [FAN_RPM] =&gt; 1460
          [FAN_MODEL] =&gt; 
          [FAN_SERIES_NAME] =&gt; AFPV3G
          [BLADE_ANGLE_VALUE] =&gt; 25.00
          [FAN_CMH] =&gt; 10000
          [EQU_PEAK_POWER] =&gt; 3601.86
          [outlet_velocity] =&gt; 8.92
          [velocity_pressure] =&gt; 4.862
          [total_velocity] =&gt; 5.20
          [SP2] =&gt; 14
          [SP3] =&gt; 42
          [SP4] =&gt; 41
          [SP5] =&gt; 1
          [SP6] =&gt; 4
          [SP7] =&gt; 4
          [SP8] =&gt; 4
          [SP9] =&gt; 4
          [SP10] =&gt; 1
          [total_eff] =&gt; 0.29
          [static_eff] =&gt; 0.19
          [BKW] =&gt; 0.486
          [Big] =&gt; 3.86
          [BigVALUE] =&gt; 26.00
          [BigPEAK_POWER] =&gt; 360.19
          [Bigoutlet_velocity] =&gt; 8.92
          [Bigtotal_velocity] =&gt; 8.72
          [SP1] =&gt; 1
          [Bigtotal_eff] =&gt; 0.43
          [BigBKW] =&gt; 0.547
      )
  
  [2] =&gt; stdClass Object
      (
          [SP1] =&gt; 1
          [FAN_MODEL] =&gt; 
          [Big] =&gt; 3.86
          [FAN_DIA] =&gt; 630
          [FAN_RPM] =&gt; 1460
          [FAN_SERIES_NAME] =&gt; AFPV3G
          [BigVALUE] =&gt; 26.00
          [FAN_CMH] =&gt; 10000
          [BigPEAK_POWER] =&gt; 360.19
          [Bigoutlet_velocity] =&gt; 8.92
          [velocity_pressure] =&gt; 4.862
          [Bigtotal_velocity] =&gt; 8.72
          [SP2] =&gt; 14
          [SP3] =&gt; 42
          [SP4] =&gt; 41
          [SP5] =&gt; 1
          [SP6] =&gt; 4
          [SP7] =&gt; 4
          [SP8] =&gt; 4
          [SP9] =&gt; 4
          [SP10] =&gt; 1
          [Bigtotal_eff] =&gt; 0.43
          [static_eff] =&gt; 0.19
          [BigBKW] =&gt; 0.547
      )
  
  [3] =&gt; stdClass Object
      (
          [Big] =&gt; 23.69
          [FAN_MODEL] =&gt; 
          [FAN_DIA] =&gt; 710
          [FAN_RPM] =&gt; 1450
          [FAN_SERIES_NAME] =&gt; AFPV3G
          [BigVALUE] =&gt; 25.00
          [FAN_CMH] =&gt; 10000
          [BigPEAK_POWER] =&gt; 6414.48
          [Bigoutlet_velocity] =&gt; 7.02
          [velocity_pressure] =&gt; 3.014
          [Bigtotal_velocity] =&gt; 26.70
          [SP1] =&gt; 3
          [SP2] =&gt; 4
          [SP3] =&gt; 5
          [SP4] =&gt; 6
          [SP5] =&gt; 7
          [SP6] =&gt; 3
          [SP7] =&gt; 2
          [SP8] =&gt; 1
          [SP9] =&gt; 2
          [SP10] =&gt; 3
          [Bigtotal_eff] =&gt; 0.62
          [static_eff] =&gt; 0.55
          [BigBKW] =&gt; 1.180
      )
  
  )
  </code></pre>
  
  <p>i have to find nearest value in each set of sp1 to sp10 for array[0]->with STATIC_PRESSURE=0.34,
  aray[2]->1
  array[3]->23.and so on..
   Please help me out here i m struct.</p>