aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2015-04-15 21:29:19 +0200
committerThomas Lange <code@nerdmind.de>2015-04-15 21:29:19 +0200
commitbf996f7247133c536511c23b6ad30aa222bfd6d9 (patch)
tree1d9388e6331454fbc9b68b5006a64c4563c202cd /include/functions.php
downloadbigpipe-bf996f7247133c536511c23b6ad30aa222bfd6d9.tar.gz
bigpipe-bf996f7247133c536511c23b6ad30aa222bfd6d9.tar.xz
bigpipe-bf996f7247133c536511c23b6ad30aa222bfd6d9.zip
Initial commit
Diffstat (limited to 'include/functions.php')
-rwxr-xr-xinclude/functions.php12
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