I'm trying to turn some query results into click-able links through PHP. I'm a beginner and don't really know much. I'm working with Wordpress. Here's what I'm shooting for: http://www.celebrything.com/
The right side bar is display the count results. I'd like the celebrity names to link to search links for each name. so the first should link to http://www.celebrything.com/?s=%22Tiger+Woods%22&search=Search
Here's the PHP I'm using to display my current results:
<?php
global $wpdb;
$result = $wpdb->get_results('SELECT name, count FROM wp_celebcount');
foreach($result as $row) {
echo ''.$row->name.' - '.$row->count.' Posts <br/>';
}
?>
The question is, how to I update this code to turn the names into search links?