code: public static function get(array $arr, $k, $default=null)
  	{
  		if ( isset($arr[$k]) ) return $arr[$k];
  
  		$nested = explode('.',$k);
  		foreach ( $nested as $part ) {
  		    if (isset($arr[$part])) {
  				$arr = $arr[$part];
  				continue;
  		    } else {
  				$arr = $default;
  				break;
  		    }
  		}
  		return $arr;
  	}
docs: Get value from nested array.
  
  @param array 	$arr
  @param string    $k
  @param string 	$default
  
  @return mixed