Array Slice without loosing index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am wanting to retain the array indexes after it being sliced. Here is what I 
have so far.

if ($user_count > $group_count)
{
	for ($i = 0; $i < $user_count; $i+=$group_count)
	{
		$output = array_slice($properties['users'], $i, $group_count);
		print_r($output);
	}
}

Every time the array is sliced it results with arrays which have new idexes. 
Is there a way I can retain the array indexes when slicing the array.

regards,
Jeffery
-- 
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia
web: http://www.ivt.com.au
phone: +61 3 9723 9399
fax: +61 3 9723 4899

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux