note 42604 added to function.array-slice

From: Date: Sun, 23 May 2004 02:39:00 +0000
Subject: note 42604 added to function.array-slice
Groups: php.notes 
Request: Send a blank email to php-notes+get-69980@lists.php.net to get a copy of this message
Contrary to what adamplumb at comcast dot net posted below, to delete a single element of either an associative array or indexed array, use unset($array[$index]); It will preserve any keys automatically. If you need to re-index them, use array_slice or another array func. ---- Manual Page -- http://www.php.net/manual/en/function.array-slice.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42604 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42604&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42604&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69980) next »