src/Mpdf.php
function SetStylesArray($arr)
	{
		$style = '';
		foreach (['B', 'I'] as $s) {
			if (isset($arr[$s])) {
				if ($arr[$s]) {
					$this->$s = true;
					$style .= $s;
				} else {
					$this->$s = false;
				}
			} elseif ($this->$s) {
				$style .= $s;
			}
		}
		$this->currentfontstyle = $style;
		$this->SetFont('', $style, 0, false);
	}
function SetStylesArray($arr)
	{
		$style = '';
		foreach (['B', 'I'] as $s) {
			if (isset($arr[$s])) {
				if ($arr[$s]) {
					$this->$s = true;
					$style .= $s;
				} else {
					$this->$s = false;
				}
			} elseif ($this->$s) {
				$style .= $s;
			}
		}
		$this->currentfontstyle = $style;
		$this->SetFont('', $style, 0, false);
	}
function SetStylesArray ( $ arr ) { $ style = '' ; foreach ( [ 'B' , 'I' ] as $ s ) { if ( isset ( $ arr [ $ s ] ) ) { if ( $ arr [ $ s ] ) { $ this -> $ s = true ; $ style .= $ s ; } else { $ this -> $ s = false ; } } elseif ( $ this -> $ s ) { $ style .= $ s ; } } $ this -> currentfontstyle = $ style ; $ this -> SetFont ( '' , $ style , 0 , false ) ; }
Set multiple styles at one time
Set multiple styles at one time