note 40156 added to function.array-slice

From: Date: Mon, 23 Feb 2004 19:47:45 +0000
Subject: note 40156 added to function.array-slice
Groups: php.notes 
Request: Send a blank email to php-notes+get-65607@lists.php.net to get a copy of this message
Use unset() to delete a associative array. Ex: <?php $item['chaise'] = array ('qty' => 1, 'desc' => 'Chaise bercante 10"', 'avail' => 10); $item['divan'] = array ('qty' => 1, 'desc' => 'Divan brun laitte"', 'avail' => 10); if (isset($item['chaise'])) { ++$item['chaise']['qty']; } unset($item['divan']); foreach ($item as $s) { echo "<br />Commande " . $s['qty'] . " " . $s['desc']; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.array-slice.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40156 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40156&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40156&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65607) next »