23 lines
494 B
PHP
23 lines
494 B
PHP
<?php
|
|
/**
|
|
* Created by CS medien- & kommunikationssysteme.
|
|
* @author Christian Steinle
|
|
* @date 04.12.2016
|
|
*
|
|
* @copyright CS medien- & kommunikationssysteme (http://www.steinle-computer.de)
|
|
*/
|
|
|
|
namespace Helper;
|
|
|
|
|
|
class Text
|
|
{
|
|
public static function prepareText($text)
|
|
{
|
|
$text = str_replace(array("\r\n", "\r", "\n"), '', $text);
|
|
$text = trim(preg_replace('/<p>/', '', $text, 1));
|
|
$text = preg_replace('/>p\/</', '', strrev($text), 1);
|
|
$text = strrev($text);
|
|
return $text;
|
|
}
|
|
} |