note 12566 deleted from function.array-unique by cmb

From: Date: Mon, 12 Nov 2018 14:35:36 +0000
Subject: note 12566 deleted from function.array-unique by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-209673@lists.php.net to get a copy of this message
Note Submitter: rein at velt dot net ---- Following code copies unique values from MyArray to TempArray. Then copies non-empty elements from TempArray to UniqueArray. Not the most elegant solution, but it works. <?php $TempArray = array_unique($MyArray); while (list($index,$data)=each($TempArray)) { if (isempty($data)) { $UniqueArray[$index]=$data; } } ?>

« previous php.notes (#209673) next »