My php code is currently separated from my html, at least as much as possible without using a framework or template system. I am echoing out $result['title'] in my html, is there an easy way to convert it to a variable so I can use $title instead?
current html:
<?php foreach ($results as $row): ?> <?php echo $row['title'] ?> <?php echo $row['description'] ?> <?php endforeach; ?>
php:
$results=$conn->query($sql);