varemenos
3/17/2012 - 4:13 PM

PHP - Array Keys to Values

PHP - Array Keys to Values

<?php
	$a = array(
		'x' => 'X',
		'xx' => 'XX',
		'xxx' => 'XXX'
	);

	var_dump(array_keys($a));

	// RESULTS
	/*

		array
		  0 => string 'x' (length=1)
		  1 => string 'xx' (length=2)
		  2 => string 'xxx' (length=3)

	*/
?>