<?php
$sql = 'select * from legal where legal_active > 0';
$rows = $sableDB->getRows($sql);
$html = '<div id="terms" style="background-color:#3cced6;">';
foreach($rows as $row)
{
	$html .= '<br />';
	$html.='<div class="container">
				<div class="row">
					<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
						<h3>'.$row['legal_name'].'</h5>
					</div>
				</div>
			</div>
			<div class="container">
				<div class="row">
					<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
						<div>'.htmlspecialchars_decode($row['legal_text']).'</div>
					</div>
				</div>
			</div>';
}
$html .= '<br />';
$html .= '</div>';
echo($html);
?>