aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.php
blob: d06823d29fb38b4b5b5cff5e39a5213c52d74310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php
#===============================================================================
# FUNCTION: Removes all line breaks and tabs from a string or an array with strings
#===============================================================================
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;
}
?>