|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-15 05:12 UTC] dave@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Mon Feb 23 07:00:01 2026 UTC |
Description: ------------ Function array_slice() always preserve string keys. The parameter "preserve_keys" is necessary only for numerical keys. The documentation is silent about it. Reproduce code: --------------- $form = array('one' => 'one value', 'two' => 'two value', 'three' => 'three value'); print_r(array_slice($form, 2)); Expected result: ---------------- Array ( [0] => three value ) Actual result: -------------- Array ( [three] => three value )