Location: PHPKode > projects > Tv.2 CMS > tv2engine/ctlSets.flib.php
<?php

/**
 * Returns a union of two sets.
 *
 * @package tv2-engine
 * @function ctlSetUnion
 * @return array union array
 * @param array a 1st union
 * @param array b 2d union
 */
function ctlSetUnion($a, $b)
{
	return @array_values(@array_merge($a, $b));
}


/**
 * Returns an intersection of two sets.
 *
 * @package tv2-engine
 * @function ctlSetIntersect
 * @return array intersection array
 * @param array a 1st union
 * @param array b 2d union
 */
function ctlSetIntersect($a, $b)
{
	return @array_values(array_intersect($a, $b));
}


/**
 * Subtracts one set from the other
 *
 * @package tv2-engine
 * @function ctlSetSubtract
 * @return array difference array
 * @param array a 1st union
 * @param array b 2d union
 */
function ctlSetSubtract($a, $b)
{
	return @array_values(array_diff($a, $b));
}

?>
Return current item: Tv.2 CMS