note 98840 deleted from function.trim by danbrown

From: Date: Sat, 10 Jul 2010 13:12:34 +0000
Subject: note 98840 deleted from function.trim by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170861@lists.php.net to get a copy of this message
Note Submitter: rafe at rafe dot me ---- A slightly more compact version of Onur Nizam's form cleaning code. No need for using external trim function, and the foreach loop removes the need for the if condition. <?php foreach ($_POST as $var => $value) { $_POST[$var] = trim($value); } ?>

« previous php.notes (#170861) next »