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



/**
* 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;

}



?>