[FX.php List] Problem re-submitting checkboxes to FM7

William Akey wcakey at hotmail.com
Fri May 12 10:41:07 MDT 2006


Andrew,

You're right, that is a useful piece of code to have in the toolkit.

Thanks for sharing

William


----- Original Message ----- 
From: "Andrew Denman" <adenman at tmea.org>
To: "'FX.php Discussion List'" <fx.php_list at mail.iviking.org>
Sent: Friday, May 12, 2006 7:20 AM
Subject: RE: [FX.php List] Problem re-submitting checkboxes to FM7


> I originally found this code on the php.net website, and it has turned out
> to be very useful in situations like this:
>
> function trim_array($x){
>    if (is_array($x)) {return array_map('trim_array', $x);}
>    return trim($x);
> }
> //Trim incoming data
> $_POST = array_map('trim_array', $_POST);
>
> This particular code will apply the trim() function to any variable,
array,
> or array with nested arrays you pass to it.  Just swap the trim() function
> with the stripslashes() function and you're set!
>
> Andrew Denman
>

> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list