note 41436 added to function.array-splice

From: Date: Fri, 09 Apr 2004 22:14:59 +0000
Subject: note 41436 added to function.array-splice
Groups: php.notes 
Request: Send a blank email to php-notes+get-67928@lists.php.net to get a copy of this message
I needed a simple script to remove some values from an array. It's very simple but ... it works fine. function array_delete_value($arr_source, $del_value) { $arr_target = array(); foreach ($arr_source as $arr_value) { if ($arr_value != $del_value) { $arr_target[] = $arr_value; } }; return $arr_target; }; ---- Manual Page -- http://www.php.net/manual/en/function.array-splice.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41436 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41436&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41436&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67928) next »