A HitchHackers guide through WordPress


Home | Pages | Archives


wp_array_slice_assoc

February 24, 2011 4:21 pm

Definition:
function wp_array_slice_assoc( $array, $keys ) {}

Extract a slice of an array, given a list of keys.

Parameters

Return values

returns:The array slice

Source code

function wp_array_slice_assoc( $array, $keys ) {

	$slice = array();

	foreach ( $keys as $key )

		if ( isset( $array[ $key ] ) )

			$slice[ $key ] = $array[ $key ];



	return $slice;

}

10601

Rate this:

Posted by Thorsten

Categories: /wp-includes/functions.php, Documentation, Files, Functions, Functions by letter w

Tags: ,

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.