Skip to main content

Posts

Showing posts with the label Trim

Trim All Posted Variables in PHP

Quick tip to trim all posted variables in PHP. <?php                          array_walk($_POST, 'trim_posted_variables');                        /**             * function to trim all the posted variables.             *             * $param : value - as we are using array_walk function, first parameter             * in the used function should be value.             * index - second parameter should be key or index.            ...