diff options
author | Thomas Lange <code@nerdmind.de> | 2015-04-15 21:29:19 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2015-04-15 21:29:19 +0200 |
commit | bf996f7247133c536511c23b6ad30aa222bfd6d9 (patch) | |
tree | 1d9388e6331454fbc9b68b5006a64c4563c202cd /include/functions.php | |
download | bigpipe-bf996f7247133c536511c23b6ad30aa222bfd6d9.tar.gz bigpipe-bf996f7247133c536511c23b6ad30aa222bfd6d9.tar.xz bigpipe-bf996f7247133c536511c23b6ad30aa222bfd6d9.zip |
Initial commit
Diffstat (limited to 'include/functions.php')
-rwxr-xr-x | include/functions.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php new file mode 100755 index 0000000..443d594 --- /dev/null +++ b/include/functions.php @@ -0,0 +1,12 @@ +<?php +#==================================================================================================== +# FUNCTION: Entfernt alle Zeilenumbrüche und Tabulatoren aus einem String +#==================================================================================================== +function removeLineBreaksAndTabs($mixed, $replace = NULL) { + if(is_array($mixed)) { + return array_map(__FUNCTION__, $mixed); + } + + return is_string($mixed) ? str_replace(["\r\n", "\r", "\n", "\t"], $replace, $mixed) : $mixed; +} +?>
\ No newline at end of file |