title: get first and last element in array
body: <p>hey there i have this array:</p>
  
  <pre><code>array(1) {
    ["dump"]=&gt;
    string(38) "["24.0",24.1,24.2,24.3,24.4,24.5,24.6]"
  }
  </code></pre>
  
  <p>my question:</p>
  
  <p>how to get the first and the last element out from this array, so i will have:</p>
  
  <pre><code>$firstEle = "24.0";
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$lastEle = "24.6";
  </code></pre>
  
  <p>anybody knows how to get those elements from the array?</p>
  
  <p>i already tried this:</p>
  
  <pre><code>$arr = json_decode($_POST["dump"], true); 
  
  $col0 = $arr[0];
  $col1 = $arr[1];
  $col2 = $arr[2];
  $col3 = $arr[3];
  $col4 = $arr[4];
  $col5 = $arr[5];
  $col6 = $arr[6];
  </code></pre>
  
  <p>i could chose $col0 and $col6, but the array could be much longer, so need a way to filter the first("24.0") and the last("24.6") element.
  greetings</p>