<?php
/*
	Stempora Web Framework
	Copyright (c) 2002-2016 Stempora. 
	All rights reserved.
		web:  www.stempora.com
		mail: support@stempora.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;

}



?>