aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2016-05-13 21:50:30 +0200
committerThomas Lange <code@nerdmind.de>2016-05-13 21:50:30 +0200
commitcdcab5593311b4bdec2b54c070d9f6133b95aaa7 (patch)
tree3029e0669d76f31284c82abcc88ff576eb5cc986 /include/functions.php
parentdab0de04e474a11311bf004d26ce238e512dbf2c (diff)
downloadbigpipe-cdcab5593311b4bdec2b54c070d9f6133b95aaa7.tar.gz
bigpipe-cdcab5593311b4bdec2b54c070d9f6133b95aaa7.tar.xz
bigpipe-cdcab5593311b4bdec2b54c070d9f6133b95aaa7.zip
Multiple updates
Diffstat (limited to 'include/functions.php')
-rwxr-xr-xinclude/functions.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/functions.php b/include/functions.php
index d06823d..fd46c63 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -1,12 +1,8 @@
<?php
#===============================================================================
-# FUNCTION: Removes all line breaks and tabs from a string or an array with strings
+# Remove line breaks and tabs from a 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;
+function removeLineBreaksAndTabs($string) {
+ return str_replace(["\r\n", "\r", "\n", "\t"], NULL, $string);
}
?> \ No newline at end of file