<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}


/**
* description
*
* @param
*
* @return
*
* @access
*/
function SortByKeys($array , $key , $order) {


	if (is_array($array)) {
		foreach ($array as $_key => $_val) {
			$_val["_key"] = $_key;			
			$_array[$_val[$key]] = $_val;
		}		
	}

	$tmp = explode("," , $order);

	foreach ($tmp as $_key => $_val) {

		if ($_array[$_val]) {
			$data[$_array[$_val]["_key"]] = $_array[$_val];
		}
		
	}
	
	

	return $data;

}



?>