note 27174 deleted from function.each by didou

From: Date: Mon, 18 Aug 2003 16:00:06 +0000
Subject: note 27174 deleted from function.each by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54594@lists.php.net to get a copy of this message
Note Submitter: erica@php.net ---- I didn't see this listed anywhere on this page... This is a piece of code that applies a PHP function to every value of an array. In this case, the PHP function is addslashes(). while (list ($key, $val) = each ($row)) { $row[$key] = addslashes($val); } That's all! Now every array value will have addslashes() applied. Substitute addslashes() with the PHP function of your choice...

« previous php.notes (#54594) next »