summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/func.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/func.inc.php')
-rw-r--r--frontends/php/include/func.inc.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/frontends/php/include/func.inc.php b/frontends/php/include/func.inc.php
index 241ca486..0881d5dd 100644
--- a/frontends/php/include/func.inc.php
+++ b/frontends/php/include/func.inc.php
@@ -337,6 +337,14 @@ function str_in_array($needle,$haystack,$strict=false){
return false;
}
+function zbx_nl2br(&$str){
+ $str_res = array();
+ $str_arr = explode("\n",$str);
+ foreach($str_arr as $id => $str_line){
+ array_push($str_res,$str_line,BR());
+ }
+return $str_res;
+}
/************* END ZBX MISC *************/
?> \ No newline at end of file