I have created a search which looks through sqlite and brings back results.I want the name of the result clicked, to add onto the URL with .php. For example, if the result car and it was clicked on, it would add /car at the end of the URL and .php at the end of it.
while ($results = $query->fetch(PDO::FETCH_ASSOC)) {
echo '<a href="' . $results['product_details'] . '">' . $results['product_details'] . ;
}