note 18043 deleted from function.array-map by john

From: Date: Fri, 01 Nov 2002 22:41:00 +0000
Subject: note 18043 deleted from function.array-map by john
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38890@lists.php.net to get a copy of this message
Be warned the callback function can't be one internal to PHP. If you want to pass an internal function as a callback to array_map (and probably others that take callback functions), you have to wrap it around with a custom function. For example: function mes_wrapper($str) { return mysql_escape_string($str); } array_map('mes_wrapper', array(...));

« previous php.notes (#38890) next »