This snippet shows you how to trim an array with single line of code. This can be achieved by using "array_map".
Source code viewer
' before and after ', ' before', 'after ', ); // Output: /* Array ( [0] => before and after [1] => before [2] => after ) */Programming Language: PHP