note 83927 added to function.array-unique

From: Date: Thu, 19 Jun 2008 08:41:36 +0000
Subject: note 83927 added to function.array-unique
Groups: php.notes 
Request: Send a blank email to php-notes+get-140578@lists.php.net to get a copy of this message
a lot of people create functions just to fix a notice error about an undefined index and removes blank array value. why not using foreach instead of the for loop? example: <?php foreach ($arrayname as $key => $value) { //do what you want with $value withaout index stress } ?> ---- Server IP: 217.13.201.10 Probable Submitter: 84.57.65.59 ---- Manual Page -- http://www.php.net/manual/en/function.array-unique.php Edit -- https://master.php.net/note/edit/83927 Del: integrated -- https://master.php.net/note/delete/83927/integrated Del: useless -- https://master.php.net/note/delete/83927/useless Del: bad code -- https://master.php.net/note/delete/83927/bad+code Del: spam -- https://master.php.net/note/delete/83927/spam Del: non-english -- https://master.php.net/note/delete/83927/non-english Del: in docs -- https://master.php.net/note/delete/83927/in+docs Del: other reasons-- https://master.php.net/note/delete/83927 Reject -- https://master.php.net/note/reject/83927 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140578) next »