note 22113 deleted from function.array-splice by googleguy

From: Date: Tue, 22 Oct 2013 06:50:33 +0000
Subject: note 22113 deleted from function.array-splice by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196670@lists.php.net to get a copy of this message
Note Submitter: paule at cs dot tamu dot edu ---- 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: <?php 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

« previous php.notes (#196670) next »