src/Arrays.php
public static function make_assoc($columns, $array)
	{
		/* init the array */
		$assoc = array();

		/* set the cursor to */
		$cursor = 0;

		/* itterate over the data, and combine the data */
		foreach ($array as $record)
		{
			foreach ($record as $key => $value)
			{
				$assoc[$cursor][$columns[$key]] = $value;
			}
			$cursor++;
		}

		return $assoc;
	}
public static function make_assoc($columns, $array)
	{
		/* init the array */
		$assoc = array();

		/* set the cursor to */
		$cursor = 0;

		/* itterate over the data, and combine the data */
		foreach ($array as $record)
		{
			foreach ($record as $key => $value)
			{
				$assoc[$cursor][$columns[$key]] = $value;
			}
			$cursor++;
		}

		return $assoc;
	}
public static function make_assoc ( $ columns , $ array ) { /* init the array */ $ assoc = array ( ) ; /* set the cursor to */ $ cursor = 0 ; /* itterate over the data, and combine the data */ foreach ( $ array as $ record ) { foreach ( $ record as $ key => $ value ) { $ assoc [ $ cursor ] [ $ columns [ $ key ] ] = $ value ; } $ cursor ++ ; } return $ assoc ; }
Convert an array into an associative array

@param array $columns the columns to match indexes on
@param array $array the data array to process
Convert an array into an associative array