How can I add a break within two values in php?

Rotoorbimemon

New Member
I got this code\[code\] $title = new FullName($reservation->Title, $reservation->Description)\[/code\]which shows the values Title and Description inside a box, but it does so directly following each other. When the box is too small it does a line break, but only at the exact point of the end of the box. so how can i force a line break between $reservation->Title and $reservation->Description ?Here is the Full Name Class\[code\] class FullName {/** * @var string */private $fullName;public function __construct($firstName, $lastName){ $formatter = Configuration::Instance()->GetKey(ConfigKeys::NAME_FORMAT); if (empty($formatter)) { $this->fullName = "$firstName $lastName"; } else { $this->fullName = str_replace('{first}', $firstName, $formatter); $this->fullName = str_replace('{last}', $lastName, $this->fullName); }}public function __toString(){ return $this->fullName;}\[/code\]}
 
Back
Top