aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.php
blob: 21eb3f02bfba64ddf937d3ad7fac222e6b404112 (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;
}
?>