So i am building this search engine, and i have some websites inside my database. But i want to do like so i can "href" to the link i have placed inside the database. This is my code i was trying to use but didn't work:
if($query->num_rows) {
while($r = $query->fetch_object()) {
$rlink = $r->link;
?>
<div class="result">
<?php echo '<a href="' .$r->link. '">' echo $r->title . "</a>"?>
</div>
<?php
}
}
And this is the error:
Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in X:\xamppUSE\htdocs\search\search.php on line 33