I'm trying to create a link from mysql results:
while($row = $result->fetch_assoc()){
echo "<a class=post_link href=http://localhost:8888/search.php?loc=".$row['loc']."<=".$row['lt']."&lg=".$row['lg'].">".$row['loc'].": ".$row['lt'].", ".$row['lg']."</a><br>" ;
}
The problem is, when 'loc' row contains more than one word. Is it possible to detect when it has two or more words and insert '%' between them, or I need to use different technique?