aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.php
diff options
context:
space:
mode:
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