src/StringLib.php
/**
     * My own 'extended' version of nl2br which works in a lot of cases where 
     * the standard nl2br doesnot
     * @param string $input - the input string to convert
     * @return string $output - the converted string
     */
My own 'extended' version of nl2br which works in a lot of cases where
the standard nl2br doesnot
@param string $input - the input string to convert
@return string $output - the converted string
My own ' extended ' version of nl2br which works in a lot of cases where the standard nl2br doesnot @param string $input - the input string to convert @return string $output - the converted string
public static function nl2br($input)
    {
        $output = str_replace(PHP_EOL, '<br />', $input);
        $output = str_replace("\r\n", '<br />', $output);
        return $output;
    }
public static function nl2br ( $ input ) { $ output = str_replace ( PHP_EOL , '<br />' , $ input ) ; $ output = str_replace ( " \r \n " , '<br />' , $ output ) ; return $ output ; }
My own 'extended' version of nl2br which works in a lot of cases where
 the standard nl2br doesnot
 @param string $input - the input string to convert
 @return string $output - the converted string
My own ' extended ' version of nl2br which works in a lot of cases where the standard nl2br doesnot @param string $input - the input string to convert @return string $output - the converted string