note 16985 added to function.unset
| From: | webmaster at beratungsdienst dot org | Date: | Wed, 21 Nov 2001 01:40:20 +0000 |
| Subject: | note 16985 added to function.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21091@lists.php.net to get a copy of this message | ||
unset() is a nice function with string-arrays when you need to insert a new item, sort the array but
not the first line (maybe headlines in textdata).
// first save the "headline"
$headline = $array[0];
// insert the new line
$array[] = $new_line;
// sort the array
sort($array);
//resave the headline
$array[0] = $headline;
--
http://www.php.net/manual/en/function.unset.php
http://master.php.net/manage/user-notes.php?action=edit+16985
http://master.php.net/manage/user-notes.php?action=delete+16985
http://master.php.net/manage/user-notes.php?action=reject+16985