aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.php
blob: 443d594688fca75290ae42bcbc4b71f813d6c4cc (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}
?>