note 22113 added to function.array-splice

From: Date: Fri, 07 Jun 2002 03:21:01 +0000
Subject: note 22113 added to function.array-splice
Groups: php.notes 
Request: Send a blank email to php-notes+get-31550@lists.php.net to get a copy of this message
Aiya, I feel silly. The fix for my code above assumes that your values in the associative array are strings. Ignore the fix code in my last post and use this instead: if(is_array($replacement)) foreach($replacement as $r_key=>$r_value) $new_array[$r_key]=$r_value; elseif($replacement!==NULL) $new_array[$key]=$replacement; Sorry again. I feel sheepish. n.n -- http://www.php.net/manual/en/function.array-splice.php http://master.php.net/manage/user-notes.php?action=edit+22113 http://master.php.net/manage/user-notes.php?action=delete+22113 http://master.php.net/manage/user-notes.php?action=reject+22113

« previous php.notes (#31550) next »